How To Modify a Shortcut Menu at Run TimeLast reviewed: March 13, 1997Article ID: Q155403 |
The information in this article applies to:
SUMMARYThe Visual FoxPro menu generator, Genmenu.prg, now contains a new generator directive to accommodate support for the new shortcut menus. The generator directive is called #PREPOP. Normally, GENMENU adds the contents of the Cleanup snippet at the end of the menu definition. With shortcut menus, the ACTIVATE POPUP command is inserted prior to the contents of the Cleanup snippet. Therefore, none of the Cleanup code executes until after the menu is deactivated. The #PREPOP generator directive places the Cleanup code (not including Procedures or functions) prior to the ACTIVATE POPUP command. This new functionality allows you to disable, enable, mark, or unmark menu items at run time.
MORE INFORMATIONThis example demonstrates the use of the #PREPOP generator directive. In the example, a command button toggles the form's AlwaysOnTop property between true (.T.) and false (.F.). Based on the value of this property, a check mark appears next to a menu bar within the shortcut menu. The following steps create the example:
|
Additional query words: #preprop short cut clean up right click
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |