property ExMenu.SendCommand as Long
Specifies whether the control sends the WM_COMMAND to the parent-window once the user selects an item, open or close a popup-menu.

TypeDescription
Long A long expression that specifies the flags to set as explained:
  • 1, the Select event is fired through the WM_COMMAND message. The WPARAM specifies the identifier of the item being selected, while LPARAM holds the handle of the control (HWND)
  • 2, the OpenMenu event is fired through the WM_COMMAND message. The WPARAM specifies the identifier of the item whose popup has been opened, while LPARAM parameter specifies the value of 2 
  • 4, the CloseMenu event is fired through the WM_COMMAND message. The WPARAM specifies the identifier of the item whose popup has been closed, while LPARAM parameter specifies the value of 3
The SendCommand property specifies whether the control sends the WM_COMMAND to the parent-window once the user selects an item, open or close a popup-menu. The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated. For instance In VFP9, you can use the BINDEVENT( thisform.hWnd, 273, thisform, "myselect" ) to catch the WM_COMMAND messages, instead catching the OpenPopup event which is not fired from modal forms, for _SCREEN object. The lParam parameter is 2, indicating the OpenPopup event ( event's identifier )