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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top Level forms Menus 1

Status
Not open for further replies.

jimsterS

Programmer
Apr 24, 2001
71
US
I want the top level form to have the menu displayed but it seems that what ever I do it the menu does not appear on the form. I have tried screen=off in the startup and still the menu displays improperly. Any help or code samples on how do this would be appreciated.
 
To make a menu appear in your top level form, the following must be done:

Open the menu in the Menu Designer. Go to the View menu and select General Options and be sure "Top-Level Form" is selected.

Be sure that the form you have it in has the ShowWindow property set to 2-As Top Level Form.

Once the Form is active, you need to call the menu with a parameter: an object reference to the top-level form. I do this from the form itself:

Procedure Init
DO MyMenu.mpr WITH THIS
EndProc

If you have done all this and it still doesn't work, what is going wrong? What does it do?
 
Thank you for the quick response. I was not aware of the general options part. However after I tried that I got a message in the execution of the menu.mpr that I am missing a parameter statement. I'm not sure what parameter I am supposed to pass.
 
I am sorry but after I went back and checked the View Options again the top level form was not set. After I set it again and looked at the generated code everything was fine and it worked. Thanks again.
 
hi, if you open the memuname.mnx program, at the begining youcan see the diferent code that you can write in the Init mand destroy method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top