4
Reply

How to open Child window in parent window,C# windows Application

Santosh More

Santosh More

Feb 13, 2012
21.1k
0

      foreach (Form childForm in MdiChildren)
                {
                    childForm.Close();
                }
                Form2 obj= new Form2();
                obj.MdiParent = this;
                obj.Show();

    Sudhakar Chaudhary
    March 19, 2012
    1

    Use this code in VB.NET

      Child frm = new Child();
       frm.MdiParent = this;
       frm.Show();

    piyush sardhara
    March 13, 2012
    0

    if you opening the child form on button click event FROM parent window....

    then..... use following Code Snippet......


       // Create a new form to represent the child form
    frmChild frm = new frmChild();

    // Make the new form a child form. frm.MdiParent = this;
    // Display the child form. frm.Show();


    Mayur Dighe
    March 11, 2012
    0

    from parent

    child.show(this);

    Dawid
    March 08, 2012
    0