Change Startup Form in C#


  • I want to change the startup form for a C# Windows Application.   I tried going to Project Properties and in the Application tab there is a drop down for Startup Object.  However, none of the project forms are listed there.  The only thing listed is NameoftheApplication.program.  Should I be looking in another place?
    Thursday, December 18, 2008 9:31 PM


All replies

  • You need a static main method.
    MSMVP VC++
    Friday, December 19, 2008 12:03 AM
  • In your program.cs, you should see a line Application.Run(new <something>);. You can change that something to the form  you want to run as startup form
    MVP Client App
    Monday, December 22, 2008 8:34 AM
  • You cannot vote on your own postGo to Program.cs from the solution explorer.

    Modify the last line of code to this:

    Application.Run(new your_start_up_forms_constructor());

    For example: if your want to open Form1 write:

    Application.Run(new Form1());

    Hope it helps

    Arunava Saha

    Wednesday, May 09, 2012 1:10 PM