Is it possible to pass command line arguments to a windows forms application?
i.e
wywinapp.exe -u bob -p password
How do I extract these values in my app?
Thanks
Printable View
Is it possible to pass command line arguments to a windows forms application?
i.e
wywinapp.exe -u bob -p password
How do I extract these values in my app?
Thanks
Environment.GetCommandLineArgs returns a string array.
The first element is the name of the executeable, the others are the command line args.
Is it also possible to do this with Sub Main()?
For example, I create Sub Main to be like:
VB Code:
Sub Main(X as Integer, Z As String)
(for example)
Then, could I call the EXE like:
appname.exe 8 HELLO
?
Not exactly, but something similar...
VB Code:
Public Shared Sub Main(ByVal args() As String) For Each s As String In args MsgBox(s) Next End Sub
Aah, I see, I see, I see... with all three eyes!