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!

Main Menu not showing in Top-Level-Form

Status
Not open for further replies.

castor2003

Programmer
Jul 5, 2003
115
LC
I have a MDI form which I use to launch my app. My main toolbar comes up fine from the Activate method. I placed DO MAINMENU.MPR in the forms INIT()and I only see a flash of it.


Any help?
 
Top-Level form menus need special handling. From the help file:
In the Init event of the form, run the menu program and pass it two parameters:

DO menuname.mpr WITH oForm, lAutoRename

oForm is an object reference to the form. In the Init event of the form, pass THIS as the first parameter.
lAutoRename specifies whether or not a new unique name is generated for the menu. If you plan to run multiple instances of the form, pass .T. for lAutoRename.

For example, you can call a menu called mySDImenu with this code:

DO mySDImenu.mpr WITH THIS, .T.

Rick
 
Prior to what rgbean has said, when you are in the menu designer, use the View menu then General options and then put a check mark on the Top Level Form. After that, Click Menu then Generate.

Hope this can help.


Bren
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top