Associated File Type

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

    #1

    Associated File Type

    I have a file extension that is associated to my application. Opening
    a file with that extension starts my application OK, but how do I get
    it to start with that selected file open?

    With thanks
    Dave

  • Mattias Sjögren

    #2
    Re: Associated File Type

    >I have a file extension that is associated to my application. Opening[color=blue]
    >a file with that extension starts my application OK, but how do I get
    >it to start with that selected file open?[/color]

    If the file association is set up correctly the file name will be
    passed on the command line. Use a parameterized Main method

    Shared Sub Main(ByVal CmdArgs As String())

    or call System.Environm ent.GetCommandL ineArgs to retrieve the file
    path.


    Mattias

    --
    Mattias Sjögren [C# MVP] mattias @ mvps.org
    http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
    Please reply only to the newsgroup.

    Comment

    • Devlei

      #3
      Re: Associated File Type

      Thank you Mattias
      You have set me off in the right direction

      Best regards
      Dave

      Comment

      Working...