Winforms Controlling Forms

Posted by jack london on Stack Overflow See other posts from Stack Overflow or by jack london
Published on 2010-03-24T09:07:49Z Indexed on 2010/03/24 9:13 UTC
Read the original article Hit count: 502

Filed under:
|

How can i control all my forms from main ()

static void Main()
{

    Form1 frm1 = new Form1();
    Form1 frm2 = new Form1();
    Form1 frm3 = new Form1();

    frm1.Show();

    while (frm1.Button.Clicked)
    {
        frm2.Show();
        frm3.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

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms