Modify

Opened 10 years ago

Closed 6 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: 3.3.14.0 Severity: None
Keywords: Cc:

Description

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

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 by anonymous, 8 years ago

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

comment:2 by J-Paul Mesnage, 8 years ago

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 by J-Paul Mesnage, 8 years ago

Owner: set to Jon
Status: newassigned

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

comment:4 by J-Paul Mesnage, 6 years ago

Resolution: Works For Me
Status: assignedclosed

Hi,

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

So MS as certainly fix the problemon their side

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.