Specifies a command that executes when you choose any menu title on a menu bar.
Syntax
ON SELECTION MENU MenuBarName | ALL
[Command]
Arguments
MenuBarName
Specifies the name of the menu bar to which you assign a command. The command executes when you choose any menu title from the menu bar. You can specify the name of a user-defined menu bar created with DEFINE MENU or the Microsoft Visual FoxPro system menu bar _MSYSMENU.
ALL
Executes a command when you choose any menu title from any menu bar.
Command
Specifies the command to execute when you choose a menu title. Use ON SELECTION MENU without a command to release a command assigned to a menu bar.
Remarks
When you create and activate a menu bar, place ON SELECTION MENU between DEFINE MENU and ACTIVATE MENU.
Use ON SELECTION PAD to execute a command when you choose a specific menu item. ON SELECTION PAD takes precedence over ON SELECTION MENU. Use ON PAD to activate a menu or menu bar when you choose a specific menu title.
Use ON SELECTION MENU without a command to release a command assigned to a menu bar.