You need the windows API functions
subroutine DragAcceptFiles (long hWnd, boolean fAccept) library "shell32.dll"
subroutine DragFinish (long hDrop) library "shell32.dll"
function int DragQueryFileW (long hDrop, int iFile, ref string szFileName, int cb) library "shell32.dll"
To allow the dropping of files to a control call
// allow drop to datawindow control dw_1
DragAcceptFiles (Handle (dw_1), TRUE)
Add an event (e.g. "dropfiles") with event ID pbm_dropfiles to get dropped files
long ll_i, ll_numFiles
string ls_file, ls_files[]
ls_File = Space(1024)
// first call gets number of files dragged
// "handle" is a event parameter
ll_numFiles = DragQueryFileW (handle, 4294967295, ls_File, 1023)
FOR ll_i = 1 To ll_numFiles
ls_File = Space(1024)
// subsequent calls get file names from dragged object
DragQueryFileW (handle, ll_i - 1, ls_File, 1023)
ls_files [ll_i] = ls_file
NEXT
DragFinish (handle)
Works great. One question... What is the parameter in DragFinish (aul_drophandle) ? Should that be just the "handle" event parameter or the handle of the dw control?
Andreas.