Window.CancelClose

From Xojo Documentation

Revision as of 22:26, 11 November 2019 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. It will go offline as of October 2, 2023. Please visit the new Xojo documentation site! - you will be redirected shortly...
Event


Window.CancelClose(appQuitting as Boolean) As Boolean

Supported for all project types and targets.

The window is about to be closed by the user clicking the close button, by calling the Quit or Window.Close methods.

Notes

When the app is quitting, CancelClose and Close are called as a pair for each open window. Close will be called after CancelClose executes, assuming that the close wasn't canceled by the user.

Return True to prevent the window (and in the case of the Quit method, other open windows) from closing. The parameter appQuitting is True when the window is being closed because the whole app is quitting and False when only the window is being closed.

See Also