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.


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


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.