Window.CloseButton

From Xojo Documentation

Read-Only Property (As Boolean )
BooleanValue = aWindow.CloseButton

Supported for all project types and targets.

If True, the window will include a Close button in its Title Bar.

Notes

Since this is the name of a property, you cannot use “CloseButton” as the name of a button or any other type of object.

macOS

If the ContentsChanged property is True, then the Close button will display a dot, which is used to indicate there are unsaved changes in the window.

MacOS does not display close buttons on Movable Modal windows.