Results 1 to 3 of 3

Thread: Program Parameters *SOLVED*

Threaded View

  1. #1

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159

    Program Parameters *SOLVED*

    Code:
    [STAThread]
    static void Main(string[] args) 
    {
    int x = args.GetUpperBound(0);
    if (x == -1) {
    	MessageBox.Show("No Parameters!");
    } else {
    	Application.Run(new frmMain(args[0]));
    }
    }
    I am trying to use command line parameters in my application but it does not work. Is there anything wrong with the code above?

    Hope somebody can help!

    DJ
    Last edited by DJ_Catboy; Sep 3rd, 2003 at 11:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width