Modify

Opened 8 years ago

Closed 6 years ago

#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 Changed 8 years ago by Jpm

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 Changed 8 years ago by Kik

Ok you were right Jpm.
Thanks

comment:3 Changed 6 years ago by Jpm

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

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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.