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

How to put a menu in a "ShowWindow=2" Top level form 1

Status
Not open for further replies.

freddiekg

Programmer
Oct 13, 2009
25
0
0
MY
Dear all,

My VFP call a "ShowWindow=2" Top level form when started, and is working fine until I try to put a menu in the form, by calling a menu (DO menu.mpr) in the Init section. Now, the form don't even show up but the EXE is still active and I have to kill the application in the Window Task Manager.

Do I have to set the following things or something else?

*Application.Visible=.f.
*_VFP.Visible=.F.
*_SCREEN.Visible=.F.

Please help and thanks in advance.
Fred
 
Fred,

It's quite simple.

Invoke your menu from the Init of the top-level form, like this:

DO MyMenu.MPR WITH THISFORM, .T.

MyMenu.MPR is the name of your menu program, THISFORM is an object reference to the form, and .T. simply forces a unique name for the menu (which is useful if you want to open multiple instances of the form).

For more information, see the VFP Help topic, "How to: Add a Menu to a Top-Level Form".

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top