jp10558 Posted July 28, 2008 Share Posted July 28, 2008 Is there a way to detect if Windows has been set to use Large fonts so that I can resize my GUI appropriately? Link to comment Share on other sites More sharing options...
Monamo Posted July 29, 2008 Share Posted July 29, 2008 (edited) Is there a way to detect if Windows has been set to use Large fonts so that I can resize my GUI appropriately?The following example is based upon a WinXP SP2 system (I don't know if there are variations between the SP levels, so I'm just clarifying just in case). Basically, the font size setting is tracked by tracing the theme, per user and then the value is set per theme based upon that setting (the size setting also happens to reset when switching between themes, but you're only interested in the "current" visible display). So, the following will identify which theme is current for the user, then checks against a value stored in that theme's key: MsgBox(64,"Current Font Size Setting","Current Value: " &_GetWinFontSize() &@CRLF) Func _GetWinFontSize() $sRegRoot = "HKEY_CURRENT_USER\Control Panel\Appearance\New Schemes" $sActiveScheme = RegRead($sRegRoot, "SelectedStyle") $iFontSetting = RegRead($sRegRoot & "\" & $sActiveScheme, "SelectedSize") Switch $iFontSetting Case 0 Return "Normal" Case 1 Return "Extra Large" Case 2 Return "Large" EndSwitch EndFunc edit: wording Edited July 29, 2008 by Monamo - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now