Msgbox font size
Msgbox font size
Is it possible to change the font size in Msgbox?
Re: Msgbox font size
Shrek is love...
- MilesAhead
- Posts: 232
- Joined: 03 Oct 2013, 09:44
Re: Msgbox font size
Nope. To customize a MessageBox the thing to do is create a Gui that looks like the dialog produced by MsgBox. Back in the day I wrote a Delphi Control that customized the Delphi MessageBox by overriding the OnPaint event. Even then the best I could do with the text is set the Font size to 10(the default is 9) and Bold. It was easier to read. If you try to jury rig a font larger than 10 all the other metrics of the MessageBox are thrown off. It will look obviously skewed when displayed. But in my case the main reason for overriding OnPaint was so that I could draw non standard backgrounds with either striping colored zones or gradients
Rolling your own is the way to go.
Rolling your own is the way to go.
"My plan is to ghostwrite my biography. Then hire another writer to put his
name on it and take the blame."
- MilesAhead
name on it and take the blame."
- MilesAhead
Re: Msgbox font size
Maybe it will help you TaskDialog or Custom message Box(CMsgox)
Donec Perficiam
Re: Msgbox font size
Thank you all, I will follow up on the leads in your posts, this will give me plenty to work on.
Re: Msgbox font size
Although ultimately I would recommend using custom MsgBox functions. It should be stated that this *is* possible.
from:
best utilities + best AutoHotkey scripts (+ useful tips) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?t=28149
[get/set MsgBox font system-wide]
[function: JEE_SystemGetFont][function: JEE_SystemSetFont]
GUI COMMANDS: COMPLETE RETHINK - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=25893
[Function] MsgBox Font Information - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=9122
==================================================
The MsgBox command uses the MessageBox dll function:
MessageBox function (Windows)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
The MessageBox dll function uses the system-wide 'Message' font, which other programs use for different purposes e.g. Mozilla Firefox.
NONCLIENTMETRICS structure (Windows)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
The 'Message Box' font can be changed manually on Windows 7 here:
Control Panel\Appearance and Personalization\Personalization
Window Color
Item: Message Box
==================================================
Btw AutoHotkey's InputBox uses a custom GUI. One hack is to use SetTimer, and change the window/control sizes and font (using WM_SETFONT).
In order to change the MsgBox font without affecting other programs and for other reasons, I'm trying to create custom MsgBox/InputBox functions.
from:
best utilities + best AutoHotkey scripts (+ useful tips) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?t=28149
[get/set MsgBox font system-wide]
[function: JEE_SystemGetFont][function: JEE_SystemSetFont]
GUI COMMANDS: COMPLETE RETHINK - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=25893
[Function] MsgBox Font Information - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=9122
==================================================
The MsgBox command uses the MessageBox dll function:
MessageBox function (Windows)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
The MessageBox dll function uses the system-wide 'Message' font, which other programs use for different purposes e.g. Mozilla Firefox.
NONCLIENTMETRICS structure (Windows)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
The 'Message Box' font can be changed manually on Windows 7 here:
Control Panel\Appearance and Personalization\Personalization
Window Color
Item: Message Box
==================================================
Btw AutoHotkey's InputBox uses a custom GUI. One hack is to use SetTimer, and change the window/control sizes and font (using WM_SETFONT).
In order to change the MsgBox font without affecting other programs and for other reasons, I'm trying to create custom MsgBox/InputBox functions.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
- MilesAhead
- Posts: 232
- Joined: 03 Oct 2013, 09:44
Re: Msgbox font size
From playing with the example program I see you are quite right. It has been quite a few years since I did the Delphi Window Controls that I used as the basis for ActiveX Controls. It turns out the dialogs I was modifying were not plain message boxes but Info, Confirm, Error and Warning dialogs with Icon etc.. They were much more sensitive to even a slight increase in font size than the plain message boxes shown in the code you linked.jeeswg wrote:Although ultimately I would recommend using custom MsgBox functions. It should be stated that this *is* possible.
"My plan is to ghostwrite my biography. Then hire another writer to put his
name on it and take the blame."
- MilesAhead
name on it and take the blame."
- MilesAhead
Re: Msgbox font size
It was thanks to the post in the link above by iPhilip that I started to find out all of this, including how to programmatically change other fonts in the Control Panel dialog.
[Function] MsgBox Font Information - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=9122
This post also by iPhilip shows how to create what I call a new-style 'two-colour' MsgBox.
Gui that looks like a MsgBox - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?t=9043
There's also examples there of MsgBoxes with a countdown and with a hyperlink.
If you use Gui, Color, FF0000, it changes the bottom colour. But I don't know how to change the top colour, if anyone knows. You can change this colour in Control Panel, but it doesn't affect the Gui command. Workarounds are possible but I would like to know! Cheers.
[Function] MsgBox Font Information - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=9122
This post also by iPhilip shows how to create what I call a new-style 'two-colour' MsgBox.
Gui that looks like a MsgBox - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?t=9043
There's also examples there of MsgBoxes with a countdown and with a hyperlink.
If you use Gui, Color, FF0000, it changes the bottom colour. But I don't know how to change the top colour, if anyone knows. You can change this colour in Control Panel, but it doesn't affect the Gui command. Workarounds are possible but I would like to know! Cheers.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Msgbox font size
I have followed the link https://autohotkey.com/boards/viewtopic.php?f=6&t=9043 in jeeswg's post and have used the script MsgBoxGui.ahk to produce a msgbox that does exactly what I wanted. I can change the font and font size to suit my requirements.
Thanks again for all your help
Thanks again for all your help
Re: Msgbox font size
Where can I get MsgBoxGui.ahk? I want to change the font in a message box.
Who is online
Users browsing this forum: Descolada, inseption86, mikeyww and 447 guests