Sizing GUI-Elements: dpi dpiaware has to be set to "True/PM" to work on Win 8.1 and above
Posted: 09 Feb 2016, 10:49
Hi,
I got the following problem:
Result on Win 10 with 125% text-size (monitor config) is wrong (shows 96 dpi). It includes the dpi-sizing, so you can't use this for positioning own GUIs.
Solution for the ahk-Team:
This has to be done while compiling autohotkey in Visual Studio:
Open source\resources\AutoHotkey.exe.manifest > set dpiaware to "True/PM"
Solution for people who can't wait for an update:
Open your compiled script with resource hacker > Manifest > 1 > set dpiaware to "True/PM"
Final should be: <dpiAware>True/PM</dpiAware>
So have a nice day without high dpi monitor problems anymore!
Greetings
Sources:
Figure 2 of http://www.drdobbs.com/windows/coding-f ... 736?pgno=3
https://technet.microsoft.com/en-us/lib ... 28846.aspx
This is interesting to react on dpi-changes while running (but i don't need it, so i didn't used it)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
I got the following problem:
Code: Select all
SysGet, MonitorWorkArea_, MonitorWorkArea
MsgBox % A_ScreenDPI "-" MonitorWorkArea_Bottom "-" MonitorWorkArea_Right "
Solution for the ahk-Team:
This has to be done while compiling autohotkey in Visual Studio:
Open source\resources\AutoHotkey.exe.manifest > set dpiaware to "True/PM"
Solution for people who can't wait for an update:
Open your compiled script with resource hacker > Manifest > 1 > set dpiaware to "True/PM"
Final should be: <dpiAware>True/PM</dpiAware>
So have a nice day without high dpi monitor problems anymore!
Greetings
Sources:
Figure 2 of http://www.drdobbs.com/windows/coding-f ... 736?pgno=3
https://technet.microsoft.com/en-us/lib ... 28846.aspx
This is interesting to react on dpi-changes while running (but i don't need it, so i didn't used it)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx