Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add open form instance (or window) to menu?
Message
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00696111
Message ID:
00698698
Views:
14
>Yes I did get both AddToMenu and RemoveFromMenu to work. However, I'm now working with Set Mark of... I'd like the active form instance to be marked but can't get this to work properly. I'm trying to set the menu's mark from the form's activate() but this results in 'no such menu or menu item is defined' even though the item is definitely on the menu. Any ideas?

Try something like:-
Local lnTot, lnBar, lcCaption

lcCaption = ThisForm.Caption
lnTot = 0
lnTot = cntbar("Window")
for lnBar = lnTot to 1 step -1
  if prmbar("Window", getbar("Window", lnBar)) = lcCaption
    Set Mark of bar lnBar of Window to .T.
    exit
  endif
endfor
Then the same in the deactivate to untick it.

HTH
Caroline
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform