I have a form1 as a parent form (and is a MDI container) which is a parent for a lot of the other child forms. Now I would like to create a Login. It should be another windows form - formLogin called. And it has to start the 1st when application is started (so it has to start before form1). Is this possible?
--------------------------------------------------------------------------------------
What I did for a test:
I tryed to set FormLogin as a parent (and MDI contrainer = true), and form1 (which it wasn`t any more a parent, and not even a MDI) and I set in the program.cs file: Application.Run(new FormLogin());
The formLogin is started, then it goes through the login code, if the username and pw are correct I simply did:
Fom1 = new Form1();
form1.MdiParent = this;
form1.Show();
But it does not open. I don`t know why.
----------------------------------------------------
But I believe this is not the correct way, it can not be the loginForm a parent, it should be the Form1.