Jump to content

Recommended Posts

Posted (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?

 

 

image.thumb.png.0e6e20f99fd2445e44d232ae4c5739ae.png

Edited by KrabKley
Posted

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)

Posted (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 by Shark007
  • Solution
Posted
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.

 

  • 2 weeks later...
Posted
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

 

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
  • Recently Browsing   0 members

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