opening child form from another child form?

  • Thread starter Thread starter VMI
  • Start date Start date
V

VMI

In my MDI Widows app, how can I open a child Form X from within another
child Form Y so that X is still inside the parent MDI Form? I'm using this
code to open the Form from X (a child Form) but it opens as a separate Form
outside the MDI:

frm_auditFromOpen frmAuditFromOpen = new frm_auditFromOpen();
frmAuditFromOpen.Owner = this.MdiParent;
frmAuditFromOpen.Show();

Thanks.
 
VMI said:
In my MDI Widows app, how can I open a child Form X from within another
child Form Y so that X is still inside the parent MDI Form? I'm using this
code to open the Form from X (a child Form) but it opens as a separate Form
outside the MDI:

frm_auditFromOpen frmAuditFromOpen = new frm_auditFromOpen();
frmAuditFromOpen.Owner = this.MdiParent;
frmAuditFromOpen.Show();

Try
frmAuditFromOpen.MdiParent = this.MdiParent;

HTH
JB
 
I had tried that before but it still opens as a separate window (is not
contained in the MDI)
 
Back
Top