Jump to content

Drag and drop location in GUI

Recommended Posts

  • Moderators

Moved to the appropriate forum, as the Dev forum states at the top


Do not create AutoIt-related topics here


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites

Here is a simple solution for you. Note the - @GUI_DropId = $Input_0

; Script generated by GUIBuilder Prototype 0.9

#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <Misc.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>


Global $h_main = GuiCreate("MyGUI", 400, 44, -1, -1, $style, $WS_EX_ACCEPTFILES)

Global $Input_0 = GuiCtrlCreateInput("", 10, 10, 380, 20)
GUICtrlSetState($Input_0, $GUI_DROPACCEPTED)


    Switch GuiGetMsg()
         Case $GUI_EVENT_CLOSE
         Case $GUI_EVENT_DROPPED
            If @GUI_DropId = $Input_0 Then GUICtrlSetData($Input_0, @GUI_DragFile)
         Case Else
 Until False




Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...