How to Highlight a Menu Bar and Popup Programmatically

Last reviewed: April 30, 1996
Article ID: Q110909
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

  • 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


    THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

    Last reviewed: April 30, 1996
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.