Window.Close event
From Xojo Documentation
Event
The Window is about to close. You cannot cancel the closing at this time. If you need to decide or interact with the user to make sure that the Window should be closed, use Window.CancelClose event instead which is called before Window.Close.
See Also
- Description of the termination process in Application.CancelClose.