DesktopWindow.Close

From Xojo Documentation

Method

DesktopWindow.Close()

New in 2021r3

Supported for all project types and targets.

Closes the window. Once closed, a window cannot be refreshed or redrawn. Calling Close triggers the CancelClosing event.