KrabKley Posted May 30, 2023 Share Posted May 30, 2023 (edited) I took a screenshot with a desktop resolution of 3840×2160 and when using the program Au3Info_x64.exe I was trying to determine the pixel. But I was never able to get a hold of him. The cursor was jumping and then I realized that Au3Info_x64.exe incorrectly determines the resolution of the monitor. Au3Info_x64.exe he says that I have 2k and this is not true. I have a resolution of 3840×2160 and the program defines 2560х1440. How to fix it? Edited May 30, 2023 by KrabKley Link to comment Share on other sites More sharing options...
KaFu Posted May 30, 2023 Share Posted May 30, 2023 I guess you have set you DPI to 150%? KrabKley 1 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
KrabKley Posted May 30, 2023 Author Share Posted May 30, 2023 thank you very much. It seems to be the only way. Windows itself defaults to a scale of 150%. at 100% nothing is visible even on a 32 monitor) Link to comment Share on other sites More sharing options...
Shark007 Posted May 30, 2023 Share Posted May 30, 2023 (edited) The cure is to recognize the scaling within your App. #AutoIt3Wrapper_Res_HiDpi=Y #include <GDIPlus.au3> _GDIPlus_Startup() Global $iScale = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", _GDIPlus_GraphicsCreateFromHWND(0), "float*", 0)[2] / 96 ;read Windows scaling _GDIPlus_Shutdown() If Not $iScale >= 1 Then $iScale = 1 ;Now you need to add [* $iScale] to all the dimensions as such . . . GUICtrlCreateButton("button", 295 * $iScale, 35 * $iScale, 20 * $iScale, 24 * $iScale) Edited May 30, 2023 by Shark007 Link to comment Share on other sites More sharing options...
Solution paw Posted June 3, 2023 Solution Share Posted June 3, 2023 Quote Change Au3Info application properties In Explorer or on the Start menu, right-click the application name, select Properties, select the Compatibility tab, and then set Override high DPI scaling behavior, scaling performed by: Application. KrabKley, ioa747 and argumentum 2 1 Link to comment Share on other sites More sharing options...
KrabKley Posted June 13, 2023 Author Share Posted June 13, 2023 On 6/3/2023 at 7:35 PM, paw said: This is the best and easiest solution. Before launching, changing the DPI to 100 and then back to 150 is also a solution, but much worse). Thanks 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