Menu Font ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
dzur
Posts: 71
Joined: 15 Jul 2016, 10:44

Menu Font ?

21 Jan 2018, 14:41

Code: Select all

Menu, MyMenu,font, s1000, Verdana
Not working.
Any workaround without having to make too many code changes by using GUI ?

Please show working example.

Appreciate your help.
Thx,
dzur
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Menu Font ?

21 Jan 2018, 15:01

According to the docs, "font" isn't a recognized Menu command. Based on that, I'd say that you can't change the font.
User avatar
jballi
Posts: 724
Joined: 29 Sep 2013, 17:34

Re: Menu Font ?

21 Jan 2018, 15:28

Adding to Osprey's comments...

There is no way to set the font via the Menu command. Exception: A menu item can be made bold by using the Default option. Ex: Menu MyMenu,Default,MyMenuItem.

The menu font is a system-wide setting for all programs and it is typically set when a theme and screen DPI is set. The following are instructions on how to change the font but remember, this will change the font for all programs that use the standard menu. Hint: Don't use a bold font.

https://thinksmartbox.com/answer/change ... windows-7/

These are instructions for Windows 7 but I'm sure that the instructions for other versions of Windows is similar.
garry
Posts: 3770
Joined: 22 Dec 2013, 12:50

Re: Menu Font ?

21 Jan 2018, 16:13

can add an icon to menu if wanted

Code: Select all

#warn
#NoEnv
setworkingdir,%a_scriptdir%
Gui,2:default
Gui,2:  -DPIScale
Gui,2:Font,Cdefault,Fixedsys
Gui,2:Color,Black
Gui,2:Color,ControlColor, Black
;-------------------------------------------------
Menu,S1,add,calc               ,MH1a
Menu,S1,add,charmap            ,MH1a
menu,myMenuBar,Add,Programs     ,:S1

Menu, MyMenuBar, Add, Notepad  , Label1
Menu, MyMenuBar, Icon,Notepad  , Notepad.exe,0,20  ;- 20 is size , maybe 16
gui,2:menu,MyMenuBar ,
;-------------------------------------------------
Gui,2:add,Text,    x10    y10             cGray       ,Test
Gui,2:show,x10 y10 w200 h100, Test
return

2Guiclose:
exitapp

Label1:
run,notepad
return

mh1a:
gui,2:submit,nohide
if A_thisMenuItem=calc
   run,calc
if A_thisMenuItem=charmap
   run,charmap
return
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Menu Font ?

21 Jan 2018, 16:41

- I wrote a function to change the system-wide menu font.
GUI COMMANDS: COMPLETE RETHINK - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 78#p131078
- Is someone going to try to write a script to create GUI menus from first principles? E.g. by using Static controls, and changing the colour when you hover over them.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen, CrowexBR, mcd, rubeusmalfoy, ShatterCoder, spellegrnio1 and 89 guests