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!

Create menu

Status
Not open for further replies.

paulvdwa

Programmer
Jan 25, 2006
11
0
0
BE
Hello,

I want to create my own menubar using following code

SET DEFAULT TO ((rstam)+'menus')
IF FILE("menu.mpr") = .F.
SET DEFAULT TO ((rstam)+'menus')
set sysmenu save
SET SYSMENU to
DEFINE MENU v3start BAR AT LINE 1
DEFINE PAD menu1 OF v3start PROMPT 'Keuzescherm' COLOR SCHEME 3 FONT "Arial",14 STYLE "B,I" key ALT+K, ''
ON PAD menu1 OF v3start ACTIVATE POPUP Keuzescherm
DEFINE POPUP Keuzescherm MARGIN RELATIVE COLOR SCHEME 4 FONT "Arial", 13 STYLE "B"
endif

With this code I get no error but I can't find v3start.mnx.
Whart is wrong?

regards,

Paul
 

Paul,

What exactly do you mean when yuo say you "can't find vstart.mnx"? The mnx file is a file that holds the output from the menu designer. The reference to vstart in the ON clause of DEFINE PAD is a reference to the menu name as defined by the DEFINE MENU. That's a symbolic name, not a file name.

I'd also like to point out that changing the default directory on the fly like this -- in order to find a particular file -- is not a good idea. It's better to keep all your source files in folders that are listed in SET PATH. That's especially true when you're dealing with menus, because the setting in force when you create the menu is not necessarily the same as when the user executes the menu command.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
To add what Mike suggested, don't set menu font or color. That's set by the user in Windows Display Settings.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top