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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
mike DelvottiRank #7,298 · 244 reputationPosted Aug 30, 2011, 12:11 PM EDT
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
VulpesRank #55 · 29.2K reputationPosted Aug 30, 2011, 12:15 PM EDT
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 :)
mike DelvottiRank #7,298 · 244 reputationPosted Aug 30, 2011, 12:32 PM EDT
NelRank #2,060 · 702 reputationPosted Aug 31, 2011, 1:29 AM EDT