Jump to content
ka0z

[Autoit] Example: Drag File and Drop in Text

Recommended Posts

Posted

Autor: enzo_

#cs ----------------------------------------------------------------------------

;Autor: enzo_
;Linguagem: AutoIt
;Função: Drag and Drop

#ce ----------------------------------------------------------------------------

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

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Func Drag File and Drop", 256, 53, -1, -1,-1, $WS_EX_ACCEPTFILES)
GUISetOnEvent($GUI_EVENT_DROPPED, "Drag")
$Input1 = GUICtrlCreateInput("[ ... ]", 8, 24, 241, 21)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$Label1 = GUICtrlCreateLabel("Arraste o arquivo e solte", 8, 8, 118, 16)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Func Drag()
ConsoleWrite("ID: "&@GUI_DRAGID & " File: "&@GUI_DRAGFILE &" Drop: "&@GUI_DROPID&@CRLF)
EndFunc

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...