Home All Groups Group Topic Archive Search About
Author
27 May 2006 5:33 AM
Devlei
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

Author
27 May 2006 8:42 AM
Mattias Sjögren
>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?

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.Environment.GetCommandLineArgs 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.
Author
27 May 2006 1:44 PM
Devlei
Thank you Mattias
You have set me off in the right direction

Best regards
Dave