Sign in to follow this  
Followers 0
qwert

Need help on DPI Awareness

2 posts in this topic

#1 ·  Posted (edited)

I'm back working a problem with font sizes when the user has their display set for 125% or 150%.

After reading a number of threads, I first added #AutoIt3Wrapper_Res_HiDpi=Y

Then I removed that directive and added this prescribed statement: DllCall("User32.dll","bool","SetProcessDPIAware")

Neither had any effect. The third method I'm aware of is to test current DPI and apply scaling to the font for each control. But that's not so simple when different fonts and sizes are on the GUI.

So before I continue, I'd like to hear of any better idea. Is there a switch that tells the operating system NOT to upscale any of my controls?

Thanks in advance for help. (I'm currently testing this on Win7 Pro.)

At 150 pct.png

Edited by qwert

Share this post


Link to post
Share on other sites



Progress is slow, but I've made some: I located a setting that (as I understand it) is supposed to exempt a program from the 125% or 150% upscaling: "Disable display scaling ..." under the Compatibility tab of a program's Properties.

Setting the option on an EXE running under Windows 10 causes the GUI to be the proper size. Although the rendered fonts are terrible, but they are the right size ... which keeps words from spilling out of boxes. (Setting "disable" in Win7 had no effect ... although one site recommended a registry edit that might work.)

Now I need to determine: can this compatibility option be set by the script, itself? Is that what the wrapper directive is meant to do?

The HowToGeek site offers some insight to this whole issue ... and says it might not be possible to solve on Win7: Notes on high dpi   (BTW, I find msdn's explanations hopeless to decipher.)

ToTry.png

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0