Parameters on an Executable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using VB.NET, I need to create an executable that will accept parameters.
This app will not have any user interface, I just want it called from another
app but I need to send some parameters in.

Can someone tell me how to do this?

Thanks!
 
The main() function has a few overloads including ones that captures
the input parameters.

e.g.

Public Class myApp

#Region "Shared"

Public Shared Sub main(ByVal args() As String)

Dim app As myApp
Dim mainForm As myForm

Try

app = New myApp(args) ' passes the arguments
into the app class
mainForm = New myForm(app) ' creates the mainForm with a
reference the app class

Application.Run(mainForm)

Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

End Sub

#End Region


End Class



hth,
Alan.
 
Back
Top