Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bar() returns 0 from popup
Message
 
To
15/07/1998 17:17:39
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00117864
Message ID:
00117880
Views:
26
Normally, the BAR() function would be referenced in an ON SELECTION BAR command, or in a procedure called from that command. BAR() returns zero when there is no active menu or if the user presses escape to exit the menu.

An example of how you might do this is in your menu, set the menu item to command, and set the command to something like:

DO MenuCase WITH BAR()

Then the bar number the user selected will be passed as a parameter to the MenuCase procedure. You could also just reference the BAR() function within the MenuCase procedure, BAR() would still work there since the menu hasn't ended yet.

>I'm probably doing something stupid here, but why does BAR() return 0 when I return from my popup? My code is:
>
>* RIGHTMOUSE CLICK
>DO menu.mpr && a popup
>lnBar = BAR()
>lnBar is always 0
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform