DragDrop with FileDrop

  • Thread starter Thread starter Owe Armandt
  • Start date Start date
O

Owe Armandt

I have made myself a little sample app that is a target of dropped file(s),
seems to work fine when the app is running. But if I drop a file on the
app's icon on the desktop it just starts - nothing more happens.

What needs to be added to the app for it to be aware of the drop when
started as a result of a drop


Owe
 
You'll want to process the command line arguments passed to
public static int Main(string[] args)

The file / dir name should be args[0] if your program was started by
drag/drop to icon
 
Thank you for your prompt response, while waiting for someone to answer here
I spent some time in other places and found that out as well - so every
thing is OK.

But, once again, thank you for your response


Owe


Michael Mayer said:
You'll want to process the command line arguments passed to
public static int Main(string[] args)

The file / dir name should be args[0] if your program was started by
drag/drop to icon


--
Mike Mayer, C# MVP
(e-mail address removed)
http://www.mag37.com/csharp/

Owe Armandt said:
I have made myself a little sample app that is a target of dropped file(s),
seems to work fine when the app is running. But if I drop a file on the
app's icon on the desktop it just starts - nothing more happens.

What needs to be added to the app for it to be aware of the drop when
started as a result of a drop


Owe
 
Back
Top