Home All Groups Group Topic Archive Search About

Retrieving command line arguments after startup

Author
7 Dec 2004 3:02 PM
Valerie Hough
Is there a way to retrieve command line arguments to my System.Windows.Forms
object OTHER THAN using the constructor Main( string args[] ) ?

Thanks in advance.
Chris Hough
Author
7 Dec 2004 2:53 PM
John M Deal
You can use either:

Environment.GetCommandLineArgs

or

Environment.CommandLine

The first returns a string array the second just a string (that you'll
need to parse).  Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Valerie Hough wrote:
Show quoteHide quote
> Is there a way to retrieve command line arguments to my System.Windows.Forms
> object OTHER THAN using the constructor Main( string args[] ) ?
>
> Thanks in advance.
> Chris Hough
>
>

Bookmark and Share