MdiChild to Normal Window and Back!

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

I have read you can change a form to MdiChild or from MdiChild back to
a normal form during run-time. I need to toggle a form between the
two.

If Me.IsMdiChild Then
Me.MdiParent = Nothing
Else
Me.MdiParent = Me.Owner
End If

Me.MdiParent = Nothing works but Me.MdiParent = Me.Owner or Me.Parent
or Me.Parent form does not return the form to a MdiChild. How can I
get a form to make itself a MdiChild? Suggestions?

Thanks
Bob
 
* (e-mail address removed) (Bob) scripsit:
I have read you can change a form to MdiChild or from MdiChild back to
a normal form during run-time. I need to toggle a form between the
two.

If Me.IsMdiChild Then
Me.MdiParent = Nothing
Else
Me.MdiParent = Me.Owner
End If

Me.MdiParent = Nothing works but Me.MdiParent = Me.Owner or Me.Parent
or Me.Parent form does not return the form to a MdiChild. How can I
get a form to make itself a MdiChild? Suggestions?

All you need is a reference to the MDI container. Then, you can assign
this reference to the 'MdiParent' property of the form that should
become an MDI child.
 
Back
Top