Window.TrueWindow

From Xojo Documentation

Read-Only Property (As Window )
WindowValue = aWindow.TrueWindow

Supported for all project types and targets.

Returns a reference to the actual enclosing window.

Exceptions

Exception Reason
NilObjectException Can be raised if the container has not yet been embedded anywhere.

Notes

TrueWindow walks up the window hierarchy and finds the actual enclosing window regardless of how deeply nested the RectControl or ContainerControl hierarchy is.

RectControl also has a TrueWindow property.