Jump to content

Windows 7 - problem with 'Make it easier to read what's on your screen'


4Eyes
 Share

Recommended Posts

Folks,

I hope this hasn't been asked before... I did look first.

Under Windows 7 and maybe Vista too, there's an option to "Make it easier to read what's on your screen". This is visible in the Display Control Panel applet.

I've found that this causes havoc with the size of text in a window. If you design a GUI to look correct at 100% er... 'magnification' is not the right word but I see no reference to what it should be called, it doesn't look right at 125% or 150%. The text is 'magnified' and no longer fits in labels, buttons or ListViews.

I've had a quick squizz in the registry but couldn't find anything appropriate... it's a big place and without a reference to even what this is called it's a nightmare.

I haven't included any code as it's really obvious.

Ok, so does anybody know how to detect this 'feature' and how do I deal with it?

4Eyes

Edited by 4Eyes
Link to comment
Share on other sites

hessebou,

Thanks. I use GUICtrlSetFont(). Unless there's a flag that I don't know of, I don't know what to do. Grrr... I don't have access to anything but XP at the mom. I'll upload a couple pic's this arvo to show the diff.

Anybody?

4Eyes

Link to comment
Share on other sites

Ok, here are 2 screen shots to demonstrate the problem. GUISizingTest is at 100% and GUISizingTest is ... ah, you guessed it! You can clearly see that the text is magnified but the controls (label and button) are not.

As far as I can see at the moment, if the user is using Win 7 (and maybe Vista too) I need to ask if they are using this magnification 'feature' then change the sizes of controls. This is ridiculous of course.

4Eyes

post-47302-12875552074447_thumb.png

post-47302-12875552279738_thumb.png

Link to comment
Share on other sites

ok i tryed a little bit around. the 100% normal view means 96DPI.

so you can use this to check DPI and if its not 96 do a msgbox or exit the script.

#include <WinAPI.au3>
$ScreenDC = _WinAPI_GetDC(0)
$DPI = _WinAPI_GetDeviceCaps($ScreenDC,88)
_WinAPI_ReleaseDC(0,$ScreenDC)
msgbox(0,"",$DPI)
Link to comment
Share on other sites

hessebou,

Ah, thank you. I didn't realise it was a DPI change. Using my 20/20 hindsight I see I can do the same in XP.

Now, not only do I know what to call it, I can detect it too.

Thanks so much.

Regards,

4Eyes

Link to comment
Share on other sites

  • 4 months later...

Is there any way to code it to read the setting (100%, 125%, 150%) and if it's set to 100%, run the GUI, but if it's set to 125 or 150 it reads that value in, sets it to 100%, then on GUI exit set it back to the way it was?

Sorry if this is considered thread necromancy, I'm having the same issue and didn't want to start a new thread

Link to comment
Share on other sites

Hi guys,

I settled my issue by using a scaling factor on the fonts and gui elements as necessary. I set a $var called $10point (and others for other point sizes) and change the contents of the var for each of 100%, 125% and 150%. It works reasonably well except when you end up with fractional point sizes like 125% of 11 point.

KaFu, I haven't studied your posts fully yet but will see if it is a better solution.

See, it just goes to show, a little necromancy never hurt anyone. :)

Regards,

4Eyes

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...