I have a VB.NET desktop application that when I double click on a file associated with the application I want the path of the file name sent to the application so I can load the file. I know I have to do something like the code below, but my application does not have a "Main" sub and im not sure how to add it.
I do have the following two subs but I cant seem to throw in the Args into the sub
VB.NET:
Public Sub Main(ByVal Args() As String)
If Args.GetLength(0) = 1 Then
Dim sFileToOpen as String = Args(0)
End if
End Sub
I do have the following two subs but I cant seem to throw in the Args into the sub
VB.NET:
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
VB.NET:
Private Sub frmbidi_Load()
Dim pd As New PrintDialog() 'printer dialog object
ReadConfig()
If ConnectionType = "usb" Then
PrinterTxt.Text = USBPrinterName 'Display currently selected printer driver
Else
End If
End Sub