setFormParent

setFormParent(form: Form);

The setFormParent method of the Form class sets the parent of a form to the form specified in the form parameter. This causes the child form to always be placed above the parent form in the order specified by the zOrder method.

Sibling controls that have the alignContainer property set do not occupy the same area on their parent. If so, use the visible property to control the window that is currently displayed.

The child form does not sit inside the parent as it does for an MDI child. The child is also closed when the parent is closed. As MDI forms cannot use this method, an exception is raised if you attempt to do so.

This method provides an alternative to running the form as a modal form (which causes all forms except the current modal form to be disabled) while still providing a dependency on the parent form. Passing a null value as the parent can clear the relationship.

The getFormParent method returns the parent of the form specified by using the setFormParent method or if the parent form was set directly by using a Windows API call.