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