Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu commands in top level form 1

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
Is there any way to reference a form from within its menu procedures? I have a top-level form with a simple menu, FILE, with a single menu item in it, EXIT. I want this menu item to close the form, but not the application. I execute the menu from my FORM.INIT event with:
Code:
DO MyMenu.mpr WITH THIS
The menu generation code gets a reference to the form as a local variable, however that variable is not available to the menu items. THISFORM is also not available to the menu items. Is there some way for the menu to reference the form? Assume that I want to be able to launch multiple copies of the form, so hard-coding the form's name into the menu's RELEASE line doesn't work.
 
Thanks Rick...I guess that's as close as I can get. I suppose if you've chosen a menu item, that form has to be the active one, so it shouldn't cause any problems. Not what I was hoping for, but it should work. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top