Document open on double-click?

  • Thread starter Thread starter David Veeneman
  • Start date Start date
D

David Veeneman

I used to know how to do this--I want to double-click on a document created
by my application and have the application and the document open. I have
created the file association in my deployment project, and double-clicking a
document does open my app. But it doesn't open the document.

I recall that the path to the document gets passed to my app as a command
line argument, and My app has to use that path to open the document.. But I
can't remember how to get the path, and I can't find the answer anywhere
online--not even the Google crawler has it.

So, here's my question: How do I get the path to the document that was
clicked, so that I can have my app open the document?

At this point, I'm not trying to do anything fancy, like preventing a second
instance of my app from opening if an instance is already running. All I
want to do is get the path. How do I do that?

Thanks in advance.
 
Hello David,

Assuming that you have a Main function that accepts string[] args, can you
check the parameters?

HTH,
r.
 
Back
Top