KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using Embarcadero RAD Studio XE to develop an application. I am trying catch the file(s) drag and drop to the application with the following code TMainForm = class(TForm) public: procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES; end; procedure TMainForm.FormCreate(Sender: TObject); begin DragAcceptFiles(Self.Handle, True); end; procedure TMainForm.FormDestroy(Sender: TObject); begin DragAcceptFiles(Self.Handle, False); end; procedure TMainForm.WMDropFiles(var Msg: TWMDropFiles); begin inherited; showmessage('catch here'); // some code to handle the drop files here Msg.Result := 0; end; This code complied without problem. Also, when I drag and drop files, the cursor show that the status changed to drag and drop but after things dropped, nothing happen (no message shown too). Is that anything wrong with that?
Tags (comma-separated)
Save Edits
Cancel