Command line parameters

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

Guest

I use VB .NET 2003 and work on a WinForm based app. This app takes some
parameters from command line when starting. What project properties can I set
so I can see those parameters in debug mode?

Thanks.
 
In the project properties dialog, select the Configuration Properties
in the "folders" part of the window, select Debugging, and voila! There
is a field labelled Command Line Arguments.
 
John,
I use VB .NET 2003 and work on a WinForm based app. This app takes some
parameters from command line when starting. What project properties can I set
so I can see those parameters in debug mode?

In the project properties you can only set the command line arguments.
It's under Configuration Properties, Debugging, Start Options.

To see them at runtime you have to write your own code to output them
to the debug output window, a message box or wherever you want them to
appear. If you write your own Sub Main you can just take a string
array as input and write that out. Otherwise you can call
Environment.GetCommandLineArgs to retrieve the arguments.


Mattias
 
Back
Top