Modify

#3252 closed Bug (Works For Me)

$GUI_DROPACCEPTED with #RequireAdmin - Windows 10

Reported by: Kik Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.2 Severity: None
Keywords: Cc:

Description

Hello
Probleme with "Drop event" only with windows 10
This exemple (documentation autoit) don't work with #RequireAdmin (work fine with win 7)

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

Example()

Func Example()
	; Create a GUI with various controls.
	Local $hGUI = GUICreate("Example", 420, 200, -1, -1, -1, $WS_EX_ACCEPTFILES)

	; Create a label and set the state as drop accepted.
	Local $idLabel = GUICtrlCreateLabel("Drop a file on this label.", 10, 10, 400, 40, $WS_BORDER)
	GUICtrlSetState($idLabel, $GUI_DROPACCEPTED)

	; Create an input and set the state as drop accepted.
	Local $idInput = GUICtrlCreateInput("", 10, 60, 400, 22)
	GUICtrlSetState($idInput, $GUI_DROPACCEPTED)

	Local $idOK = GUICtrlCreateButton("OK", 310, 170, 85, 25)

	; Display the GUI.
	GUISetState(@SW_SHOW, $hGUI)

	While 1
		Switch GUIGetMsg()
			Case $GUI_EVENT_CLOSE, $idOK
				ExitLoop

			Case $GUI_EVENT_DROPPED
				ConsoleWrite('22')
				; If the value of @GUI_DropId is $idLabel, then set the label of the dragged file.
				If @GUI_DropId = $idLabel Then GUICtrlSetData($idLabel, @GUI_DragFile)

		EndSwitch
	WEnd

	; Delete the previous GUI and all controls.
	GUIDelete($hGUI)
EndFunc   ;==>Example

Thanks

Attachments (0)

Change History (3)

comment:1 by J-Paul Mesnage, on Jul 12, 2016 at 7:53:15 AM

For me the behavior of Windows 10 is normal as when you run in Admin mode you have different access rights.
The question is the access rights in Windows 7 are certainly identical as the one in requireadmin . You can verify that the confirmation of the switch to admin mode is not done,
so the drop is OK

comment:2 by Kik, on Jul 13, 2016 at 3:54:25 PM

Ok you were right Jpm.
Thanks

comment:3 by J-Paul Mesnage, on Jan 29, 2018 at 3:45:28 PM

Resolution: Works For Me
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


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