From Xojo Documentation
The application is quitting.
There is nothing you can do to abort the quitting process at that time. If you need to control if your application can or cannot quit in the current context, use Application.CancelClose or Window.CancelClose.
- Description of the termination process in Application.CancelClose.