>Thanks for your help Mark, but is that the only way?
> I mean, for what I intend, I don't know if that will sort the problem out.
>My purpose is to create a program that (when a menu is active) will give me a list of all the bars within all the popups of that menu, so that then, I can specify for every user if he will have access to that menu option, or not.
> I know I'm pushing it, but I'm really desperate, and retrieving the popup names seems to be the only way of doing it. And besides, I could store all the Menu options into a dbf, updating it every time I changed the menu, and work from there, but that leaves too many loose ends...
Unless you specify the name of the popup in the menu designer, VFP derives it from the prompt of the pad. The following code will return the name of the popup for user-defined menu items:
for lxx = 1 to cntbar("_msysmenu")
lcpadprompt = prmpad("_msysmenu",getpad("_msysmenu",lxx))
lcdisallowed = space(0)
for lyy = 1 to 47
lcdisallowed = lcdisallowed + chr(lyy)
endfor
for lyy = 58 to 64
lcdisallowed = lcdisallowed + chr(lyy)
endfor
for lyy = 91 to 96
lcdisallowed = lcdisallowed + chr(lyy)
endfor
for lyy = 123 to 255
lcdisallowed = lcdisallowed + chr(lyy)
endfor
lcpopname = chrtran(lcpadprompt,lcdisallowed,"")
? lcpopname
endfor
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao