Modify ↓
Opened 10 years ago
Closed 8 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 by , 10 years ago
comment:3 by , 8 years ago
| Resolution: | → Works For Me |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

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