Hi,
I have several forms in my windows application.
By default is opning a form which I don't want to be the first.
Can anybody help me how to change the order of displaying of the forms please?
Thanks in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
mike DelvottiPosted Aug 30, 2011, 4:11 PM
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
NelPosted Aug 31, 2011, 5:29 AM
mike DelvottiPosted Aug 30, 2011, 4:32 PM
VulpesPosted Aug 30, 2011, 4:15 PM
Typically, this contains a line such as the following:
Application.Run(new Form1());
If you want a different form to show first then just change Form1 to the class name of that form.
Notice though that closing the opening form will cause the whole application to terminate, not just the opening form itself. You may therefore need to review your form closures after making this change.
EDIT: Sorry, Mike must have posted as I was typing mine in :)