Jump to content

Issue w/ Drag and Drop


Recommended Posts

I got the drag and drop working but I have no idea on how to make the file path show up once I drag and drop it.

I'm not nearly done so bear with me...

; First build - finish GUI
#include <GUIConstants.au3>

GUICreate("QuikInstall 2005 (Build 620 - Beta)",400,270)

$list = GUICtrlCreateEdit("Drag and Drop Files Here",5,5,350,210,-1,$WS_EX_ACCEPTFILES)
GUICtrlSetState($list,$GUI_ACCEPTFILES)
GUISetState()

While 1
    $msg = GUIGetMsg()
    
    If $msg = $gui_event_close Then
        Exit
    EndIf

    If $msg = $gui_event_minimize Then
        WinSetState("QuikInstall 2005 (Build 620 - Beta)",@SW_MINIMIZE)
    EndIf
WEnd

If my posts or emails are not in the correct format, too bad! Technology is my territory!My Programming Page (I need members!):http://doublexlegion.gwgaming.net/

Link to comment
Share on other sites

There were several problems...

1.) When you only have one function to execute when using If...EndIf, then you can make it all in one line with no endif. Ill show you in the code below...

2.) Your WinSetState was missing the "text" parameter, but you don't need that winsetstate there? Because the window automatically minimizes when you click the minimize button! :evil: I'll show you in your code below.

3.) You forgot to add $WS_EX_ACCEPTFILES state to the extra style to the GUI :D

Heres the finished code...

; First build - finish GUI
#include <GUIConstants.au3>

GUICreate("QuikInstall 2005 (Build 620 - Beta)", 400, 270, -1, -1, -1, $WS_EX_ACCEPTFILES)

$list = GUICtrlCreateEdit("Drag and Drop Files Here", 5, 5, 350, 210)
GUICtrlSetState($list, $GUI_ACCEPTFILES)
GUISetState()

While 1
   $msg = GUIGetMsg()
   
   If $msg = $gui_event_close Then Exit
WEnd

Bueno Suerte! :)

FootbaG
Link to comment
Share on other sites

for some reason i took out that extended style...wish i hadn't now.

as for the rest, the minimize thing i didnt realize and i thank you for that, and the one line if endif statements are just my style...

thanks a bunch!!!

but now it only displays one file at a time...i kinda need many file paths to be displayed...

Edited by Centurion_D

If my posts or emails are not in the correct format, too bad! Technology is my territory!My Programming Page (I need members!):http://doublexlegion.gwgaming.net/

Link to comment
Share on other sites

for some reason i took out that extended style...wish i hadn't now.

as for the rest, the minimize thing i didnt realize and i thank you for that, and the one line if endif statements are just my style...

thanks a bunch!!!

but now it only displays one file at a time...i kinda need many file paths to be displayed...

<{POST_SNAPBACK}>

anyone?

If my posts or emails are not in the correct format, too bad! Technology is my territory!My Programming Page (I need members!):http://doublexlegion.gwgaming.net/

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...