Solved

How can I detect "Larger Font" setting in Win 7?

Posted on 2010-08-26
8
1,597 Views
Last Modified: 2013-12-14
I have a problem detecting that Windows 7 with Aero is set in "Larger 150%" mode.

Here is a matrix of values that I can detect to determine the font setting:
In Windows XP:
Set to:            OS   Aero      DPI   Title Bar Height
 Normal:,            5.1,      False,   96,    26
 Large:,            5.1,      False,   96,    30
 Extra Large:  5.1,   False,   96     36
      
In Win 7 (Aero Mode)  
Set to:                             OS   Aero    DPI   Title Bar Height
Smaller 100% (default):,  6.1, True,   96,   22
Medium 125%:,                6.1, True,   120,  27
Larger 150%:,                 6.1, True,    96,   22

In Win 7 (Non Aero Mode)      
Set to:                              OS   Aero    DPI   Title Bar Height
Smaller 100% (default):,  6.1,  False,  96,   19
Medium 125%:,                6.1,  False,  120,  24
Larger 150%:,                 6.1,  False,  144,  29

Note that Windows 7 when set to "Larger Font 150% returns a DPI of 144 in non-Aero mode but 96 when in Aero mode.  That means that my matrix of values in Windows 7 Aero mode shows the same values whether it is in Smaller (default) or Larger mode.

I'm not sure what the results will be in Vista as I do not have a Vista system available so I may be asking a similar question for Vista.

The current question however is:  How can I detect "Larger" mode in Win 7 Aero?

I don't need full code - all I need is to find a "get-able" property that is guaranteed to be different between
Win7-Aero-smaller fonts and Win7-Aero-Larger Fonts.

When switched into "Larger Font" mode, btw, my 1600 by 1200 LCD monitor show a resolution of 1057 by 800.

0
Comment
Question by:DMTrump
  • 6
  • 2
8 Comments
 
LVL 54

Accepted Solution

by:
McKnife earned 500 total points
ID: 33541732
Hi.
Did you ever monitor the registry while changing the value? You can use procmon to do it or record the changes with wininstall LE (by scalable software) or with regshot. All I know is that starting with windows 7, it's a per user setting, which makes machine wide detection more complicated.
0
 

Author Comment

by:DMTrump
ID: 33541944
That's a good suggestion.  I'll investigate to see what I can find.
0
 

Author Closing Comment

by:DMTrump
ID: 33547983
That is such a good path to take that I'm awarding you the points, even though I've not yet been successful with the method.  See my further comment for more information.
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:DMTrump
ID: 33548000
Although I've awarded the points for an excellent suggestion I'm stymied in putting it into practice - but my problems in doing that are another issue that I may have to raise in the Delphi forum.

Here's what I found in the registry - the only value that appears to be related to this issue.

Windows 7 Aero and Non-Aero both:
[HKEY_USERS\S-1-5-21-1425574761-4149950604-329294024-1001\Control Panel\Desktop\WindowMetrics]
Smaller
"AppliedDPI"=dword:00000060
Medium'
"AppliedDPI"=dword:00000078
Larger
"AppliedDPI"=dword:00000090

However, the same key under these two section the value is 60 for all three resolutions
[HKEY_USERS\.DEFAULT\Control Panel\Desktop\WindowMetrics]
[HKEY_USERS\S-1-5-18\Control Panel\Desktop\WindowMetrics]

I suspect also that the Key Path portion "S-1-5-21-1425574761-4149950604-329294024-100" is an ephemeral value that will be different for every instance of machine/user.

Furthermore, I've been unable to retrieve the value from my machine even when specifying the exact path as listed above.  But as I say - that's a different inquery.
0
 

Author Comment

by:DMTrump
ID: 33548029
Ahhhh - that "S-1-5-21-1425574761-4149950604-329294024-100" must be the "CURRENT USER" ID.
0
 

Author Comment

by:DMTrump
ID: 33548105
SOLUTION EXPLAINED:

McKnife's solution was absolutely correct - and here's the rest of the story:

In whatever language you are using, read the value for
HKEY_CURRENT_USER \Control Panel\Desktop\WindowMetrics AppliedDPI

The value returned for
smaller: 96
medium: 120
larger: 144

Obviously the registry values are recalculated from 60, 78,  and 90 so don't expect those values.

Thanks,  McKnife,  You gave me the right lead!  (Doh!  Why didn't I think of it myself?  <BG>)


     

0
 
LVL 54

Expert Comment

by:McKnife
ID: 33548644
To add one: 60, 78 and 90 are the Hex values. If you find a user defined value in there, you can use calc.exe (view set to programmer) to transform the hexadecimal number into decimal.
0
 

Author Comment

by:DMTrump
ID: 33549420
Oh that's another big Doh!

BTW,  I simply used regedit export to get the registries for the various configurations then did a file compare using ExamDiff to find the Key I was interested in and compare the values.

The code I used in my app to extract the value automatically displays integers as decimal values - whereas the raw registry entries always shows integer values in Hex format.  But I had forgotten that!

Thanks again!
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question