Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu() return empty string
Message
From
12/03/2002 22:12:56
 
 
To
11/03/2002 22:48:24
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00631323
Message ID:
00631882
Views:
23
John,

I believe you can only return the name of MENU()when it is active... but, if you really need to know which menu you are working with (I sometimes do)... create a property myapp.ccurrmenu...
In the cleanup of your menu, put:


IF TYPE("myapp") = "O"
*-- myapp exists, so do you have the property assigned???
IF TYPE("myapp.ccurrmenu")= "U"
*-- hey we do, pop the name of the menu in
myapp.ccurmenu = thismenuname
ENDIF
ENDIF
<\PRE>

HTH,

Ric
>Hi,
>I try to use MENU() to get the active menu name. However, VFP return empty string even I have do mymenu.mpr. I try to get sample from help. And I found that, MENU() will return _MSYSMENU if I add this statement
>
>ON SELECTION MENU _MSYSMENU MESSAGEBOX(MENU())
>
>Why?
>How to solve it?
>Thank you
Previous
Reply
Map
View

Click here to load this message in the networking platform