469,573 Members | 1,655 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

How to set a startup Form??

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.
Nov 22 '05 #1
2 4082
Right click the project in the solution explorer and choose properties, then
on the build pages you can set the startup form.
"Imayakumar" <im******@hotmail.com> wrote in message
news:07****************************@phx.gbl...
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.

Nov 22 '05 #2
(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.
-----Original Message-----
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.
.

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Imayakumar | last post: by
1 post views Thread by John Michael | last post: by
10 posts views Thread by PC Datasheet | last post: by
4 posts views Thread by Chris Ashley | last post: by
6 posts views Thread by Steve Enzer | last post: by
4 posts views Thread by Johnnie Miami | last post: by
10 posts views Thread by Bernie Hunt | last post: by
reply views Thread by Jack Russell | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.