How to set start form

I had a single window form compiled in a winform project. Now I add a new form, rename the old form with ".sav" extension, move it to an archive folder in the project, recompile the project and am surprised to see the old form shows instead of the new form. How can I set a start form among many like on a webform project  Thanks.

Answer this question

How to set start form

  • Dennis L. Hughes

    When I add a new winform, I don't see void main() in it. Do I have to add it manually every time  Thanks.
  • Jitu

    Open the project properties and set the startup object.

    You also have the Main method, usually located in Form1:
    [STAThread]
    static void Main()
    {
        Application.Run(new Form1());
    }
    You can change the startup form here and even add a condition to choose a form at run-time.

  • Simon Tamman

    No, your program can only have one Main() method. Visual Studio automatically adds it to the first form when you create a new project. 
  • How to set start form