Problem reloading MDI child form in main form.
Hi,
VB.net problem
First time the MDi child form loads good.
Initial MDI Child form loads fine.
exp.
Dim objChild2 As New Form2()
objChild2.MdiParent = Me
objChild2.Show()
----
MDI Child unloads just fine.
Exp.
If e.Button Is tbbExit Then
'' Me.Close()
Me.Hide()
rs.Close()
cn.Close()
End If
---
The MDI Child reload does not reload into the parent form.
It reloads outside the parent form.
exp.
Dim oForm As New Form2()
oForm.MdiParent = Me.ActiveMdiChild
oForm.Show()
Regards
Re: Problem reloading MDI child form in main form.
Int he first part which works you have
objChild2.MdiParent = Me
In the second part, which doesn't work, you have
oForm.MdiParent = Me.ActiveMdiChild
Don't try to set MdiParent to Me.ActiveMdiChild.
Re: Problem reloading MDI child form in main form.
VB.Net User
Answer from Microsoft:
Dim oForm As New Form2()
oForm.MdiParent = Me.ParentForm
oForm.Show()
Re: Problem reloading MDI child form in main form.
I am bigginer of VB.NET.Can u help me how I can create child form of MDIparent form?