[Solved] How to transfer files with drag and drop. lazarus / 31-LCL ---------------------------------------------------------------------- loaded · 2021-10-26 11:20 Hi Dear Friends, With the help of the code below; I get the file path into the listbox by drag and drop the file on the desktop. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.FormDropFiles(Sender: TObject; const FileNames: array of String);var  i:integer;begin    ListBox1.Clear;    for i:=0 to Length(FileNames)-1 do    begin      listbox1.Items.Add(FileNames[i]);    end;end; procedure TForm1.FormCreate(Sender: TObject);begin  AllowDropFiles:=true;end; Now I want to do the opposite. Well ; From the file path information, how can I transfer the file to a folder with drag and drop. I would be grateful if you help. Respects. ---------------------------------------------------------------------- RayoGlauco · 2021-10-26 11:26 Hello, Loaded, You can check this link: https://wiki.lazarus.freepascal.org/Drag_and_Drop_sample I found this code example, for a tEdit: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Edit1MouseDown(Sender: TObject; Button: TMouseButton;   Shift: TShiftState; X, Y: Integer);begin  if Button = mbLeft then   {check if left mouse button was pressed}    Edit1.BeginDrag(true);  {starting the drag operation}end; ---------------------------------------------------------------------- loaded · 2021-10-26 13:31 Hello RayoGlauco, thank you very much for your reply. I tried but unfortunately it didn't work. Apparently there are other things I need to learn. ---------------------------------------------------------------------- loaded · 2021-10-27 16:08 As a result of my research; https://www.swissdelphicenter.ch/en/showcode.php?id=2335 https://forum.lazarus.freepascal.org/index.php?topic=42233.0 I created an example that can work double-sided with small touches. Thanks to the guys in the link. Let's put it here, maybe it will be useful to others one day. ---------------------------------------------------------------------- TRon · 2023-06-28 19:53 Quote from: han on June 28, 2023, 09:48:43 pmThe "Bidirectional Drag Drop File.rar" file is damaged. No, it is not. Try to download again (the crc32 is $00d132a4) and/or updating your unrar or 7zip unpacker. ---------------------------------------------------------------------- han · 2023-06-28 19:57 I got is fixed. My older Winrar could not handle it, but I managed to get it converted online to zip.