Setting a Form as a Startup Form with Visual Studio
Posted
Wed, Dec 15 2010 14:03
by
Deborah Kurata
The startup form is the first form that is launched when your application is executed. By default, a Windows Forms project creates a default form when the project is created. This form is set as the startup form.
You can change the startup form to any form within your application following the steps below. In this example, the report form is set as the startup form for testing purposes.
To Set a Form as a Startup Form:
In C#:
Modify the Program.cs file as follows:
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ReportWin());
}
In VB:
1) Double-click on My Project under the project in Solution Explorer.
2) Click the Application tab.
3) Set the Startup form.

Use this technique any time you want to change the start up form for the application.
Enjoy!