Question MDIContainer inside another MDIContainer

Rythmboyz

New member
Joined
Aug 30, 2010
Messages
2
Programming Experience
Beginner
Hello.

I have One MainForm for my system. This MainForm is MDIContainer. From that form, i call other forms that are MDIContainers too. So, when i try to open one of this childForms from the MainForm

frmMain is GrandParent form
frmSub is Parent form
frmChild is child form



frmSub.MdiParent = Me // Me is the frmMain which is the Grandparent form
frmSub.Show()


i get this error.


Form cannot be both an MDI child and MDI parent.
Parameter name: value



Is there any workaround about this?



Thanks
 
Yes, don't attempt to nest Mdi and you'll be fine. INFO: Windows Does Not Support Nested MDI Client Windows

Thanks for your response.
but my actual problem is my project cant perform checking child form before i perform form_closing


when i perform checking in main form, below method work as expected:

Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If Me.MdiChildren.Length >= 1 Then
MsgBox("frmSub still open")
e.Cancel = True
End If
End Sub

but i cant do the same checking in frmSub.
Is it another way to do checking whether the frmChild still open or not before i perform form_closing for frmSub?
 
Back
Top