Command line parameters

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.
 
Z

zacks

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.
 
M

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top