Document open on double-click?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Veeneman

    Document open on double-click?

    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.

    --
    David Veeneman
    Foresight Systems


  • Ranjan

    #2
    Re: Document open on double-click?

    Hello David,

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

    HTH,
    r.
    [color=blue]
    > 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.
    >[/color]


    Comment

    • David Veeneman

      #3
      Re: Document open on double-click?

      For the benefit of anyone else researching the question, here are a couple
      of MSDN articles on point:





      --
      David Veeneman
      Foresight Systems


      Comment

      • David Veeneman

        #4
        Re: Document open on double-click?

        That simple? Thanks.


        Comment

        Working...