Jump to content

Problems with 4k (3840×2160) resolution.


Go to solution Solved by paw,

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...

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...