Microsoft KB Archive/110909

From BetaArchive Wiki

How to Highlight a Menu Bar and Popup Programmatically

ID: Q110909

2.00 2.5x 2.6x | 2.5x 2.6x

MS-DOS         | WINDOWS

kbprg The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6x
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x

To programmatically activate a menu pad and the associated popup, use the ACTIVATE MENU <menu_name> PAD <pad_name> command. For example:

1. Create a quick menu. 2. From the Menu menu, choose General Options. 3. Choose Cleanup. 4. In the Cleanup code, type the following:

      ACTIVATE MENU _MSYSMENU PAD _MSM_FILE

5. Generate the menu. 6. Save the menu as TEST. 7. Run the TEST menu. Note that the File menu is highlighted and the popup is active.

To have this process be repeated when a program or screen is exited and control is returned to the menu, make the ACTIVATE MENU command the last line of code executed in the program or screen.

For the system menu pad names, see the "Language Reference" starting on page L3-637.

For more information on how to do this in Visual FoxPro, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q143074
   TITLE     : How to Highlight a Menu Option or Menu Item Programmatically

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.60 2.60a bar highlight menu back return KBCategory: kbprg KBSubcategory: FxprgGeneral

Keywords          : FxprgGeneral 
Version           : 2.00 2.5x 2.6x | 2.5x 2.6x
Platform          : MS-DOS WINDOWS

Last Reviewed: May 1, 1996
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.