Jump to content

Drag & Drop not working with high DPI


 Share

Recommended Posts

Hello all,

I've noticed that drag & drop in AutoIt GUI doesn't work when Windows DPI is set higher than the default 100%. I got a new monitor and I'm using it at 150% since the resolution is very high. When trying to drag & drop using scripts that I know work it just doesn't do anything. If I change the setting to 100% it works as normal. Has anyone else come across this issue?

Test code:
 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#NoTrayIcon

Opt("GUIOnEventMode", 1)

Global $MainGUI


GUICreation()

While 1
    Sleep(1000)
WEnd

Func GUICreation()
    $MainGUI = GUICreate("Test", 500, 100, Default, Default, "", $WS_EX_ACCEPTFILES)
    $TestInput = GUICtrlCreateInput("", 80, 10, 348, 20)
    GUICtrlSetState($TestInput, $GUI_DROPACCEPTED)
    $Exit = GUICtrlCreateButton("Exit", 220, 40, 60, 25)
    GUICtrlSetOnEvent($Exit, "Quit")
    GUISetState(@SW_SHOW)
EndFunc   ;==>GUICreation

Func Quit()
    GUIDelete($MainGUI)
    Exit
EndFunc   ;==>Quit

Try this code with your monitor set to 100% and try dragging & dropping a file in the Input, it's location should populate the Input, then set it to something higher like 125% or 150% and try dragging & dropping a file again to reproduce the issue.

I'm using Windows 10 Pro 64bit by the way.

Does anyone know a workaround?

Edited by AoRaToS

s!mpL3 LAN Messenger

Current version 2.9.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

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

  • Recently Browsing   0 members

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