Jump to content

Drag and drop question


vbMark
 Share

Recommended Posts

Here is what I have so far...

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

GuiCreate("MyGUI", 280, 235,(@DesktopWidth-280)/2, (@DesktopHeight-235)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_EX_ACCEPTFILES + $WS_EX_TOPMOST)

$Label_1 = GuiCtrlCreateLabel("Drop all files to be appended on to form.", 90, 90, 110, 40)

GUICtrlSetState ( $Label_1, $GUI_ACCEPTFILES )

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---

What event happens, or do I watch for, when the files are dropped on the form? I want to get the path to all the files dropped onto the form.

Thanks!

Link to comment
Share on other sites

I use a textbox to drag-and-drop in.

In the loop, you check if the textbox <> "", then StringSplit the contents to a variable. That array will contain all filenames. Afterwards you clear the contents again.

Link to comment
Share on other sites

I use a textbox to drag-and-drop in.

In the loop, you check if the textbox <> "", then StringSplit the contents to a variable. That array will contain all filenames. Afterwards you clear the contents again.

<{POST_SNAPBACK}>

That's cool. How do you get the items from the array?
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...