A FormEx is made into an MDI child form by assigning a reference to the MDI parent to it's MdiParent property which is what FormEx.MakeMDIchild does.
To make a FormEx that is an MDI child a normal form again you need to assign a null reference to its MdiParent property. Unfortunately this is not possible, even using the Door library because the Door library cannot handle null values
.
I do have a hugely enhanced Door library for my own use that can do this but I don't want to post it without consulting Erel as I have stolen the Door library source and merged it with my DoorEx library to make a Door library on steroids
. However here is a teeny-weeny library, with source for merging, that can set any property to null as follows. ObjN1 is an ObjectNull.
ObjN1.New1
ObjN1.Value = FormEx2.ControlRef
ObjN1.SetPropertyNull("MdiParent")
I have tested on an MDI child FormEx in FormExDemo program and it seems to work OK transforming the MDI child back to a normal FormEx