Opened 7 years ago

Closed 3 years ago

#3255 closed Bug (Works For Me)

Drag & Drop not working when Windows DPI setting is above 100%

Reported by: antonis@… Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


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.

Test code:

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

Opt("GUIOnEventMode", 1)

Global $MainGUI


While 1



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")

EndFunc ;==>GUICreation

Func Quit()


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.

The setting is in Display Settings, under "Customize your display" and says "Change the size of text, apps, and other items"

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by anonymous

Pixelseach and Mousemove have the same problem wenn Windows DPI is divernt than 100%
like 4k Display and WindowsDPI 150%

comment:2 Changed 6 years ago by Jpm

I reproduce your pb uder Window10 RS3
I don't know how to correct as it is working under Windows 7
Jon certainly can understand and fix it (change by WIndows DPI handling is certainly the pb)

comment:3 Changed 6 years ago by Jpm

  • Owner set to Jon
  • Status changed from new to assigned

Finaly I submit a fix to Jon going around the Fact that the Windows API DragQueryPoint() is working differently Under Windows 10

comment:4 Changed 3 years ago by Jpm

  • Resolution set to Works For Me
  • Status changed from assigned to closed


I try again under Windows 10 (2004) and the current AUtoIt and it works

So MS as certainly fix the problemon their side

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.