Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does a menu item already exist?
Message
From
12/04/2005 22:37:54
 
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01004016
Message ID:
01004028
Views:
19
Thanks alot.

P.S. how do add the stars to a response?

>Try
cM7enuItem = "LifeCyle - Build"
>lFound = .F.
>FOR m=1 TO CNTBAR("_MTOOLS")
>	lnBarNum = GETBAR('_MTOOLS', m)	
>	lFound = lFound or (PRMBAR("_MTOOLS",lnBarNum)=cMenuItem)
>NEXT
>IF NOT lFound
>	DEFINE BAR (CNTBAR("_MTOOLS")+1) OF _MTOOLS PROMPT cMenuItem KEY ALT+L MESSAGE "Open LifeCycle - Build Cycle"
>	ON SELECTION BAR (CNTBAR("_MTOOLS")) OF _MTOOLS DO "&cAppPath.lcBuild"
>ENDIF
>
>>I am trying something like that.
>>
>>What I am attempting is to locate a popup item I may have placed there earlier. Here some code...
>>
>>
>>cMenuItem = "LifeCyle - Build"
>>lFound = .F.
>>FOR m=1 TO CNTBAR("_MTOOLS")
>>	lFound = lFound or (PRMBAR("_MTOOLS",m)=cMenuItem)
>>NEXT
>>IF NOT lFound
>>	DEFINE BAR (CNTBAR("_MTOOLS")+1) OF _MTOOLS PROMPT cMenuItem KEY ALT+L MESSAGE "Open LifeCycle - Build Cycle"
>>	ON SELECTION BAR (CNTBAR("_MTOOLS")) OF _MTOOLS DO "&cAppPath.lcBuild"
>>ENDIF
>>
>>
>>But, This fails to locate the menu item without erroring.
>>
>>I am trying to recall how I use to determine the existance of a menu item.
>>
>>
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform