FileAssociation problem

  • Thread starter Thread starter Guy
  • Start date Start date
G

Guy

Hi,
Enyone knows how to retrieve then filename in your application when you
click in windows explorer on a file that has a fileassociation with your
app?
 
In VB6, this was available in Command$ so that

Dim strArg as String
strArg = Command$

would give you the filename (and path)

In VB.NET, I believe you use Microsoft.VisualBasic.Command

Roy
 
* "Guy said:
Enyone knows how to retrieve then filename in your application when you
click in windows explorer on a file that has a fileassociation with your
app?

\\\
Public Sub Main(ByVal astrCmdLineArgs() As String)
Dim i As Integer
For i = 0 To astrCmdLineArgs.Length - 1
Console.WriteLine(astrCmdLineArgs(i))
Next i
End Sub
///

Set the project's startup object to "Sub Main".
 
Back
Top