Interrupt of close Servoy Smart Client

Is there a way, that I can interrupt the close of servoy client window (using the red X in the upper corner)?

I want to ask the user if he is sure that he want to leave the client and also if the client is in a transaction, I would like to disallow the close of the client. User must first finish the transaction.
In that case only with Taskmanager you can quit the client without this check

look at the onclosemethod of a solution.
you can return false there to stop it (except if it is a forced shutdown from the admin pages thats unstopable)

Thanks Johan,

If it works like you describe, then it does what I’m looking for

Perfect, it works exactly like I wanted