From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Quits the application.
|status||Integer||For console applications only, the optional parameter returns a status code.
When you call Quit, it will terminate your application and returns the status code in status.
Calling the Quit method will call the Application class’s CancelClosing event. To cancel the close, return True from this event. If it does not return True, each window's CancelClosing event handler will execute. CancelClose and Close are called as a pair for each open window.
If a CancelClosing event handler returns False (the default action) then the window's Closing event handler will be executed. If any window's Closing event handler returns True, the app will not quit and no further CancelClosing or Closing events will be sent.
If you just need to have your app quit when last window is closed, you can use the Application.AutoQuit property.
This example quits the application.