Microsoft KB Archive/191526

= PRB: READ MENU In DO..WHILE Loop Causes VFP Screen to Jump =

Article ID: 191526

Article Last Modified on 12/11/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



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.



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.

