Drag and Drop Files

BlitzMax Forums/BlitzMax Programming/Drag and Drop Files

SebHoll(Posted 2006) [#1]
Hi,

In my program (MaxGUI based), I am making a file explorer window that allows users to run a server application on one computer and connect to it with a client application allowing you to see files in specified directories. The interface resembles that of Windows Explorer with "virtual files" showing the user in an icon based list box, what they can download.

At present, I have support for dragging files from Windows Explorer onto the window and it uploads the files to the server. However, what I'd like to be able to do is drag file from the List Box onto the desktop - allowing the user to download files straight to their desired folder.

I ran an ExpertsExchange request to find out how to do this in VB and I've found out that you can do it in VB6 using the following code:
VB6 Example Code
========================
Private Sub Picture1_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
    Data.Files.Add "C:\dragtest.txt"
    Data.SetData , vbCFFiles
End Sub
========================
Bearing this in mind, does anybody have any ideas how I'd be able to do that sort of thing in BlitzMax. E.g. using the Windows API.

Thanks

Seb