I'm dragging and dropping files from Explorer to my Application using the ShellAPI unit.
On my form I have a listbox to which I want to drag files. In form.create I add DragAcceptFiles(lstFiles.Handles, True); //where lstFiles is my list box. This appears to work - i.e. cursor changes to Accept drop but the WM_DROPFILES message is not received. If I use the form's handle it works but of course the Accept Drop Cursor appears anywhere on the form. The form is not the main form of the application and is brought up as a modal dialog. I have the same code running successfully with a listbox control on the Main form in another application. Could this be the difference? Also, how do I determine what files are attempting to be dropped? Ideally I would like to test what was being dropped while it was being dragged and only show the Accept Drop mouse cursor when files of the correct type were being dropped. John Barrat _______________________________________________ Delphi mailing list -> Delphi@elists.org http://www.elists.org/mailman/listinfo/delphi