Recent

Author Topic: Drag'n'drop file and path to external program  (Read 397 times)

AMJF

  • New Member
  • *
  • Posts: 14
Drag'n'drop file and path to external program
« on: April 13, 2021, 12:36:06 pm »
I have written programs in Lazarus/FPC that receive items outside of the programs by drag and drop and then process them, but I can't seem to find any way to do it the other way around, so I can send a file and path string to an external program.

How can I do this, please?

six1

  • Jr. Member
  • **
  • Posts: 94
Re: Drag'n'drop file and path to external program
« Reply #1 on: April 13, 2021, 12:49:32 pm »
"Drag&Drop" Component in OnlinePackageManager if it's for Windows

AMJF

  • New Member
  • *
  • Posts: 14
Re: Drag'n'drop file and path to external program
« Reply #2 on: April 13, 2021, 01:32:37 pm »
The program I wrote that received dragged info was much simpler to code, it started like this:

Code: Pascal  [Select][+][-]
  1. procedure TfLP.FormDropFiles(Sender:TObject; const FileNames:array of String);
  2. var
  3.   FNAM,UID,EXT : String;
  4.   P,T          : Integer;
  5. begin
  6.   for T:=Low(FileNames) to High(FileNames) do begin

I thought drag'n'drop functionality would be the same both ways, and simple, too.

Why does going in the other direction require so much extra stuff?

AMJF

  • New Member
  • *
  • Posts: 14
Re: Drag'n'drop file and path to external program
« Reply #3 on: April 25, 2021, 09:17:48 am »
"Drag&Drop" Component in OnlinePackageManager if it's for Windows

Rather a late reply, but this solved my issue completely! Thanks!

 

TinyPortal © 2005-2018