how to cancel 'close form' action?

A

Alex

hi anyone,

I need to cancel a close form action in my application if
some condition is true..
I want to give a message and leave the form opened, even
though the button "close" was pressed.
How to do it?

thanks in advance.
alex
 
A

Allen Browne

Cancel the Unload event of the form.

Ultimately, there is not a very nice way to achieve this, as you can get
conflicting messages in Form_BeforeUpdate, Form_Error, and Form_Unload
events.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top