Found this example in the documentation (TIEFileDragDrop):
Drag Example
// Allow image to be dragged from a TImageEnView (to Windows Explorer, for example)
procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
ssFiles: TStringList;
begin
if GetKeyState(VK_LBUTTON) < 0 then // Mouse left button is down
begin
ssFiles := TStringList.Create;
ssFiles.Text := ImageEnView1.IO.Params.FileName;
IEFileDragDrop1.InitiateDragging( ssFiles, [iedaCopy] );
FreeAndNil(ssFiles);
end;
end;
But it does not work.
How to make it work?