Ask the Expert

Is there any way to open the called child form in the same MDI form where the calling form resides?

When I am trying to open a child form from another child form, it is opening outside the MDI form. Is there any way to open the called child form in the same MDI form where the calling form resides? This is the code written in child2 to open the child1:

Dim Child1 As New frmChild1
Dim mdi1 as new frmMDI
child1.MDIParent = mdi1
child1.Show()
Make sure mdil has its IsMdiContainer property set to true. Try:

Dim Child1 As New frmChild1
Dim mdi1 as new frmMDI
mdil.IsMdiContainer = True
child1.MDIParent = mdi1
child1.Show()

This was first published in June 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: