Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Menu() return empty string
Message
De
12/03/2002 22:12:56
 
 
À
11/03/2002 22:48:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00631323
Message ID:
00631882
Vues:
22
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform