FormChild reference to FormChild in FormMDI

Jun 25 2007 12:52 PM
Hi,
I have a ParentForm (FormMDI) and tow ChildForm : FormChild1, FormChild2

- Step1 : Open FormChild1 by Menu

FormChild1 f = new FormChild1();

f.MDIParent=this;

f.show();

- Step2 : On FormChild1 I have a button when clicked it can open FormChild2 but FormChild2 still inside FormMDI.
Detail:
In ParentForm:

Memuitem_clicked(sender,e)
{
FormChild1 f = new FormChild1();
f.MDIParent = this
f.show();
}

My first child (FormChild1) contain a button and event:

button1_clicked(sender,e)
{
FormChild2 f = new formChild();
f.MDIParent = ???//I want FormChild2 opened from here and it inside FormParent
f.show();
}

In VB.Net,I see can do this

hoangsamac

Answers (1)