Hi all,
I've got a MDIParent Form (frmMain) from which I launch a MDIChild Form (frmMDI_1).
Now I want to launch the second MDIChild Form (frmMDI_2) from within the first MDIChild Form. The MDIParent of the second MDIChild Form should also be frmMain.
I tried to do this as shown below
When the code above is ran the frmMDI_2 Form is not shown as a MDIChild but as a normal form. What am I doing wrong?
Thanks
I've got a MDIParent Form (frmMain) from which I launch a MDIChild Form (frmMDI_1).
Now I want to launch the second MDIChild Form (frmMDI_2) from within the first MDIChild Form. The MDIParent of the second MDIChild Form should also be frmMain.
I tried to do this as shown below
Code:
'Inside a Module
Public WithEvents MainForm As frmMain
Public WithEvents Child1 As frmMDI_1
Public WithEvents Child2 As frmMDI_2
'Inside the frmMDI_1 Form
Child2 = New frmMDI_2
With Child2
.MdiParent = MainForm
.Show()
.WindowState = FormWindowState.Maximized
End With
When the code above is ran the frmMDI_2 Form is not shown as a MDIChild but as a normal form. What am I doing wrong?
Thanks