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

Creating a menu for standalone (.exe) form? 2

Status
Not open for further replies.

Paco75

Programmer
Oct 11, 2001
239
US
Hi,

I am looking to add a menu to my application. It is a standalone form compiled as .exe file. I tried to use the wizard to create menu but it seems to only modify the VFP 9 main menu.

any help is appreciated

thanks

 
Are you saying you want the menu to appear in the form, as opposed to the outer VFP window?

If so, do the folliwing:

1. Create a menu in the menu designer (check the Help for details about how to do that).

2. Create your form, and make it a top-level form (set its ShowWindow property to 2).

3. In the Init of the form, add this code:

DO MyMenu.MPR WITH THISFORM

where MyMenu.MPR is the file containing the generated menu code.

4. Build and run the application. Don't forget to include MyMenu.MPR in the project.

That should get you started. Come back if you need any more details.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Thanks the only thing i was not doing is the part where we have to generate the .mpr file... now it's all working fine! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top