opening child form from another child form?

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.
 
T

The Last Gunslinger

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
 
V

VMI

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top