PRB: READ MENU In DO..WHILE Loop Causes VFP Screen to Jump (191526)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q191526

SYMPTOMS

If a READ MENU is contained in a DO...WHILE loop, the Visual FoxPro screen jumps.

RESOLUTION

READ MENU is included for backward compatibility with FoxBase. Use the menu builder instead.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

Save the following code to a program file and run the program:

Sample Code

   *-- Code begins here.
   PRIVATE menu1
   DECLARE menu1[3,2]
   menu1[1,1]=" Edit "
   menu1[1,2]=''
   menu1[2,1]=" Browse "
   menu1[2,2]=''
   menu1[3,1]=" Exit "
   menu1[3,2]=''
   STORE .F. TO done
   DO WHILE .NOT. done
      MENU BAR menu1, 3
      READ MENU BAR TO menu_acr, mchoice
   DO CASE
   CASE menu_acr = 1
      = MESSAGEBOX("Choice 1")
   CASE menu_acr = 2
      = MESSAGEBOX("Choice 2")
   CASE menu_acr = 3
      STORE .T. TO done
   ENDCASE
   ENDDO
   RELEASE WINDOW Win1
   RETURN
   *-- Code ends here.
				

REFERENCES


Modification Type:MajorLast Reviewed:12/11/1999
Keywords:kbprb KB191526