How to set a startup Form??

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.
 
S

Scott M.

Right click the project in the solution explorer and choose properties, then
on the build pages you can set the startup form.
 
K

Ken K

(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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top