DragDrop event during application startup.

G

Guest

Hello,
I'm trying to allow users to drag a file (in this case a crystal report .rpt
file) onto my application's icon and have that drop event open my application
and open the report in the application.

Currently I can use the drop event in the reportviewer to be able to drag
the .rpt into my application while it's open.... that works great. But I
can't get it to work when the application is not open. Basically I can't find
the event that fires to allow me to accept dropped files upon application
startup.

For an idea of the action that I am talking about try dragging a .txt file
onto a notepad icon. Notepad is launched and the text file is opened in the
notepad window.
 
C

Chris

Dpage said:
Hello,
I'm trying to allow users to drag a file (in this case a crystal report .rpt
file) onto my application's icon and have that drop event open my application
and open the report in the application.

Currently I can use the drop event in the reportviewer to be able to drag
the .rpt into my application while it's open.... that works great. But I
can't get it to work when the application is not open. Basically I can't find
the event that fires to allow me to accept dropped files upon application
startup.

For an idea of the action that I am talking about try dragging a .txt file
onto a notepad icon. Notepad is launched and the text file is opened in the
notepad window.

When that happens notepad is launched like: "notepad.exe c:\file.txt"

So your application has to be able to accept a commandline parameter of
a rpt file at startup. It's not a dragdrop event of any kind at this point.

Does that clear it up for you?
Chris
 
G

Guest

Yes, that is so obvious I'm embarrassed i didn't think of that... I spent all
morning doing dragdrop event handling I didn't think of the command line
coming into it at all. :)

So how do I go about reading command line arguments from my winform? Never
done that before...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top