Microsoft KB Archive/98922

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, 2.5a

-

SUMMARY
When you use the DEFINE MENU and ACTIVATE MENU commands to display a user- defined menu, the menu bar will disappear from the screen if you press the ESC key or use the mouse to click on an empty part of the screen. Putting the ACTIVATE MENU command inside a loop will keep the menu from deactivating. This is especially useful for FoxPro versions 1.x.

Below is a sample program that demonstrates how to activate a menu in a loop.

MORE INFORMATION
This example will keep the menu called &quot;main&quot; active at all times until the variable called &quot;x&quot; is equal to false, at which time the menu is deactivated.

  ****Program example**** SET SYSMENU OFF x=.t.  DEFINE MENU main DEFINE PAD option OF main PROMPT 'Option' at 1,1

ON SELECTION PAD option OF main DO stopit

DO WHILE x    ACTIVATE MENU main ENDDO

PROCEDURE stopit x=.f.  DEACTIVATE MENU main Additional query words: FoxDos popup

Keywords         : Version          : Platform         : Issue type       :
 * }