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

changing Windows menu font size from VFP

Status
Not open for further replies.

tsilviu

Programmer
Joined
Jun 16, 2005
Messages
2
Location
RO
Hi!
I wanna change the Windows menu font size from VFP. How is possible?
Thanks!
 
Why you want to do that?
The user has been made Her/His adjustments for the Windows and I am sure S/He doesn't want somebody to mess with Her/His adjustments.
If you want just to resize your application MENU. Build the menu with Menu Designer. Open YourMenuName.MPR and on every DEFINE ... COMMAND you can put FONT "FontName",nFontSize STYLE cFontStyle.
So you can put the font size in variable and use it, but remember to initialize this variable BEFORE DO YourMenu somethig like that:
Code:
nMenuFontSize = 12

DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4 FONT "Arial", nMenuFontSize 
DEFINE BAR _mfi_save OF _medit  PROMPT "\<Save" ;
    FONT "Arial", nMenuFontSize ;
    KEY CTRL+S, "Ctrl+S" ;
    PICTRES _mfi_save ;
    MESSAGE "Saves changes to the current file"
DEFINE BAR _mfi_savas OF _medit  PROMPT "Save \<As..." ;
    PICTRES _mfi_savas ;
    FONT "Arial", nMenuFontSize ;
    MESSAGE "Saves changes to the current file with a new name"

...

Borislav Borissov
 
VFP8 Help says:
"The FONT clause is ignored for menu titles added to the Visual FoxPro system menu _MSYSMENU".
So... how i change the size of the _MSYSMENU?

 
There is no way to change _MSYSMENU FontSize, if you don't use API to Change The Menu font for whole Windows. But As I said I personaly don't want to mess with system setting of the Windows, For your information check:
This is function writen for Caption font, but it can be easy modified for Menu one.

Borislav Borissov
 
Don't do this. As others have said, the user changes the font size in Windows Display Settings and Windows UI Guidelines state you should leave it alone. Your changes will affect all Windows applications.

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

Part and Inventory Search

Sponsor

Back
Top