-3

This may sound like a simple problem but I am having trouble determing the order in which my forms appear whenever it is Debugged (Start/Launch).

Lets say I want the login form to appear first before a user can access the admin panel. At the moment, since I created the admin panel first (which is also a form) followed by the login form, the admin panel launches before the login form.. I hope that makes sense.

I was wondering if there is a way to order on which the forms appear in Visual Studio 2013..?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341

2 Answers2

3

Open the auto-generated program.cs in Visual Studio It has a call to Application.Launch which gets the type of form to show by default. That will probably contain your admin panel for now, change it to the other form.

Now, when the logon is successful, you'll need to call this.Hide() on your Login form and create a new form for your Admin Form and show that. You'll find more posts that explain that topic here on StackOverflow.

Community
  • 1
  • 1
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
1

Go to Solution Explorer -> Double Click My Project -> Under Start up Form, Click The form which you would like to appear first