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.

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.