From Xojo Documentation

Property (As Boolean )
aApplication.AutoQuit = newBooleanValue
BooleanValue = aApplication.AutoQuit

New in 5.5

Supported for all project types and targets.

When True, the application quits when the last window is closed, whether by calling the Close method of the Window class or by the user closing the last window manually.


AutoQuit defaults to True on non-MDI Windows applications and True on Linux. It defaults to False on MDI Windows and macOS applications.

Sample Code

This code is in the Open event of the App class.

App.AutoQuit = True