How to set a startup Form??

  • Thread starter Thread starter Imayakumar
  • Start date Start date
I

Imayakumar

Hi,
I got two forms, named Form1 and Form2 ion a VB.NET
Windows application.. by default if i run the application,
Form1 gets launched..i need to set Form2 as the startup
form how do i do it??
Thanks.
Imaya Kumar J.
 
Right click the project in the solution explorer and choose properties, then
on the build pages you can set the startup form.
 
(This applies to C#)

Go to your current startup form.
Find the following section:

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(MyForm);
}

Cut it out and paste it into the form which you now wish
to be the new startup form.

Remember to change whatever is in the place of "MyForm"
to your new form's name.

- Ken K.
 
Back
Top