How can i control all my forms from main ()
Form1 frm1 = new Form1();
Form1 frm2 = new Form1();
Form1 frm3 = new Form1();
Application.Run(frm1); // This way form-control goes to the frm1.
// In frm1 i have to write
frm1.Clicked += ()=>frm2.Show;
// I want the form-controlling style more explicitly
// I dont want to use Application.Run()
frm1.Show();
frm1.Clicked += frm2.Show();
form.ShowDialog () helps much but the execution stack can overflow.
Form.Show and Form.Hide methods runs when an application class has been set.
In Application.Run (Form) way there’s always a main form. and i dont want this one. Any other approach you use in this problem
Your problem is, that you have four forms. All of them should exist side by side, but because you made
Form1to the master you got some problems.To solve this you need another
FormMasterabove all four of them. This one will be started fromApplication.Run(). Now this form can beVisible = false, but in its constructor you can create all your four forms and decide how they will be glued together, which one will be shown first and under which circumstances your whole application will be closed.