>I have a form which when right clicked will bring up a popup menu but Im confused on how to get the users selection. I have a textbox in my form and the goal is to have a popup menu and when a user selects an option from the popup menu it will add the name of the selection to the textbox text.
Visual FoxPro 9.0 Language Reference
BAR( ) Function
Returns the number of the most recently chosen item from a menu defined with DEFINE POPUP or a menu item chosen from a Visual FoxPro menu.
Specifies the menu item.
nMenuPosition
Specifies a position on the menu. nMenuPosition can range from 1 through the number of items within the menu. 1 corresponds to the first item on the menu, 2 to the second item, and so on.
Return Value
Numeric
Remarks
Use GETBAR( ) to determine which item occupies a specific position on a menu. This function is useful when items on a menu are added, removed, or rearranged. Use DEFINE BAR to add an item to a menu or RELEASE BAR to remove an item. The position of items in a menu can be changed if MOVER is included when the menu is created with DEFINE POPUP.
.......
DO WHILE .T.
ME.Work()
ENDDO