In article <#h**************@TK2MSFTNGP10.phx.gbl>, Bob Lidgard wrote:
Hi, I need some help. Hopefully this is trivial!
I have created a special file type for my application. I can easily
associate the app with the file type manually and I have even seen som code
to do this as well. (MSDN - 185453)
However, once the app is launched after double-clicking on the file,
how can I identify which file was selected, i.e. triggered the launch.
Pls point me to the right direction for search!
Thanks,
Bob
Bob,
I believe the file path is passed in as a command line argument. So,
just check the command line - either by including it in your main
declaration or use System.Environment.CommandLine or
System.Environment.GetCommandLineArgs to retrieve the command line...
' main method
Public Sub Main(ByVal Args() As String)
....
End Sub
' System.Envrionment.CommandLine
Dim cmdLine As String = System.Envrionment.CommandLine
'System.Environment.GetCommandLineArgs()
Dim cmdLine() As String = System.Environment.GetCommandLineArgs()
HTH,
Tom Shelton