0

I have a MDIparent form with a panel inside. Now I had already call a childform_No1 into the panel. But some how I need to call another childform_No2 from childform_No1 to the panel in MDIparent. How can it be? Kindly help! thank.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by wahwah_hk
0

how I need to call another childform_No2 from childform_No1 to the panel in MDIparent.

....
            Form a = new Form();
            a.MdiParent = mdiObj;
            a.Parent = mdiObj.panel1;
            a.Show();
.....
0

My work as show below :
Inside the ParentForm, I have a button with the following code

private void button_Click(object sender, EventArgs e)
        {
            Form1 child = new Form1();
            child.TopLevel = false;
            child.Dock = DockStyle.Fill;
            panel1.Controls.Add(child);
            child.Show();
        }

After that inside the form1, also contain a button that use to call out form2 and allocated at the panel1 of the parentFrom.
I have try to declare the modifier of the panel1 as public, and using the code above to call out the form but some how it can't work also. Any Idea?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.