Prevent a dialogue box from closing

When I use the sample CRM file shipped with Servoy, all dialogues are handled in a tab panel (new window).

How do I prevent a dialogue box from closing with the standard Windows X in the upper right hand corner.

When a user closes the dialogue box incorrectly the application hangs!

Is there a way to disable the Windows (red X).

Thanks

If you create an onHide method that returns false and connect it to the onHide property of the form, then the dialog can not be closed by the cross in the upper corner anymore.

Thanks Sanneke,

You have to be careful returnning false, I just used…

return false;

That shut me down completly.
I now know to return true when the correct button is pushed.

That is a very powerful method!

Yeah that is tricky, I should have said that you have to return true or false depending on if the user used your button or not.