Sign in to follow this  
Followers 0
Achilles

Dragging not working with an Input box

3 posts in this topic

#1 ·  Posted (edited)

What all is supposed to work with dragging files? I have used a list, but for a new program I'm making I was hoping it would work for a picture too. However now it's now even working for a Input box... Anybody have any ideas why?

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

GuiCreate('Testing Input - Accepting Files', 300, 30) 

    GuiSetOnEvent($GUI_EVENT_CLOSE, '_Exit')

GuiCtrlCreateInput('', 5, 5, 290, 20, -1, $WS_EX_ACCEPTFILES) 
    GuiCtrlSetState(-1, $GUI_DROPACCEPTED)
    GuiSetOnEvent($GUI_EVENT_DROPPED, '_Drop')

GuiSetState() 

While 1 
    Sleep(200)
WEnd

Func _Drop() 
    Msgbox(0, 'File Was Dropped', @GUI_DropID) 
EndFunc 

Func _Exit() 
    Exit 
EndFunc
Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites



You have the $WS_EX_ACCEPTFILES in the wrong place

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

GUICreate('Testing Input - Accepting Files', 300, 30, -1, -1, -1, $WS_EX_ACCEPTFILES)

GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')

GUICtrlCreateInput('', 5, 5, 290, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetOnEvent($GUI_EVENT_DROPPED, '_Drop')

GUISetState()

While 1
    Sleep(200)
WEnd

Func _Drop()
    MsgBox(0, 'File Was Dropped', @GUI_DropId)
EndFunc   ;==>_Drop

Func _Exit()
    Exit
EndFunc   ;==>_Exit

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

You have the $WS_EX_ACCEPTFILES in the wrong place

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

GUICreate('Testing Input - Accepting Files', 300, 30, -1, -1, -1, $WS_EX_ACCEPTFILES)

GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')

GUICtrlCreateInput('', 5, 5, 290, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetOnEvent($GUI_EVENT_DROPPED, '_Drop')

GUISetState()

While 1
    Sleep(200)
WEnd

Func _Drop()
    MsgBox(0, 'File Was Dropped', @GUI_DropId)
EndFunc   ;==>_Drop

Func _Exit()
    Exit
EndFunc   ;==>_Exit
Sweet, that fixed it... Thanks!

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


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
Sign in to follow this  
Followers 0