I'm having trouble getting drag drop from Explorer to work in my app. When I create a simple VCL form app I can use the demo code in here and it works fine. My own drop target is a control aligned deep within frames and embedded forms and moving the working demo routine to this form does not work. I've tried placing a TPanel on the deeply embedded form after moving the forms other controls aside so that I can try the demo code here: way of dropping onto TPanel, this does not work either. If I place the line
DragAcceptFiles(Handle,true);
in the FormCreate of my MAIN form, the cursor indicates that I can accept files, but the same line does not seem to enable receipt of dragged files for any other deeper controls. Can anyone suggest what I might be missing? Thanks.
TPanel
demo you linked to passesPanel1.Handle
instead of the form'sHandle
. The target can be anyTWinControl
. – Ondrej Kelle