Hello,
You may want to try Microsoft.VisualBasic.Command() function. Here is what
Help file says:
Returns the argument portion of the command line used to launch Visual Basic
or an executable program developed with Visual Basic.
Public Function Command() As String
Remarks
For applications developed with Visual Basic and compiled to an .exe file,
the Command function returns any arguments that appear after the name of the
application on the command line, as in this example:
MyApp cmdlineargs
Example
This example uses the Command function to get the command-line arguments in
a function that returns them in an object containing an array.
Function GetCommandLineArgs() As String()
' Declare variables.
Dim separators As String = " "
Dim commands As String = Microsoft.VisualBasic.Command()
Dim args() As String = commands.Split(separators.ToCharArray)
Return args
End Function
You may add your own filetypes in setup project configuration.
Hope it helps :-)
sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
"paul" <(E-Mail Removed)> wrote in message
news:036c01c3c038$d135ee60$(E-Mail Removed)...
> I have a file type that is going to be associated with my
> visual basic application and i want the user to be able
> to double click on a file of said type and have it launch
> the program and load the file. I know there are certain
> keys in the registry that i have to create and/or edit.
> I have located them, namely HKEY_CLASSES_ROOT\.stdf and
> HKEY_CLASSES_ROOT\stdf_auto_file\shell\open\command
>
> The default value for that last key is the path to my
> application followed by "%1". I thought that this would
> take the file that was double clicked and pass it to my
> program but on inspection of the
> Environment.GetCommandLineArgs() I found that only the
> path to the calling program is getting passed.
>
> Is there a problem with my registry keys or my visual
> basic program that needs to be addressed. Any help is
> greatly appreciated.
> Thanks
> -Paul