Jump to content

drag and drop to window with image


Recommended Posts

Hi! Happy holidays 2 everyone!!

I have a little problem with drag and drop to image.

Example - trash on yours desktop. I cant find the way to read data from $GUI_DROPACCEPTED control

Remake of autoit library examples

#include <GUIConstantsEx.au3>
Local $file, $btn, $msg
GUICreate(" My GUI input acceptfile", 320, 120, 0, 0, -1, 0x00000018); WS_EX_ACCEPTFILES
$file = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 5, 0, 300, 75)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$btn = GUICtrlCreateButton("Ok", 40, 75, 60, 20)
GUISetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()
    Select
        Case $msg = $btn
            ExitLoop
    EndSelect
WEnd
MsgBox(4096, "drag drop file", GUICtrlRead($file))
Edited by ExKiller
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...