Recent

Author Topic: DragDrop component from OPM (by Anders Melander)  (Read 290 times)

domasz

  • Hero Member
  • *****
  • Posts: 553
DragDrop component from OPM (by Anders Melander)
« on: September 08, 2024, 12:38:47 pm »
I am trying to use Drag Drop component from OPM in my project to drag&drop files from my program to Explorer.
It does work but I want to keep subdirectories and right now all files are dropped to the destination directory without any subdirs.

Here's the code:
https://forum.lazarus.freepascal.org/index.php/topic,68414.msg528825.html#msg528825


domasz

  • Hero Member
  • *****
  • Posts: 553
Re: DragDrop component from OPM (by Anders Melander)
« Reply #1 on: September 08, 2024, 01:37:49 pm »
This is it:

Code: Pascal  [Select][+][-]
  1. DropFileSource1.MappedNames.Add('hello\there\kenobi.exe');
  2. DropFileSource1.Files.Add('C:\star\trek\gandalf.bmp');

It copies gandalf.bmp to whatever Explorer directory you choose + hello\there subdir and names it kenobi.exe

 

TinyPortal © 2005-2018