Attached is a demo for drag and drop, taken from the Lazarus installation files.
Unit 2 is not needed, but part of the demo.
What I cannot manage:
1) Hot to run within a FRAME instead of within a form?
If I care to transfer everything from the demo form to my frame, - it just does not work any more. The parent-form does not accept the file.
There will be to change anything with the parent Form1, I suspect, but what?
2) The condition for accepting the file shall not be "checked" of a check box as in the demo, but "is a pdf-file". How to put it?
If you wonder, how the frame becomes part of the from. It takes its place as a tabsheet on a TPageControl.
if Frame_Belege = nil then begin
Frame_Belege:=TFrame_Belege.Create(self);
Frame_Belege.Parent:=TabSheet_Belege;
end;