need to hide the window by "close" button

use window.Hide in the Close event. but seems this will destroy the window.
is there a way just hide it?

Hide it in CancelClose and return true

You will have to use a flag and an if structure when you actually want to close.

He’s gonna have fun when he’s trying it without a flag :stuck_out_tongue_winking_eye:

I just use an if appQuitting then … else … end if since appQuitting is already provided. What do you need a flag for?

To circumvent the CancelClose of the Window returning true. The developer might want to close the window later on, but not as late as when the user wants to shutdown the application.

[quote=285151:@Michel Bujardet]Hide it in CancelClose and return true

You will have to use a flag and an if structure when you actually want to close.[/quote]

quite right?thanks