preventing form to close

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Hi,
Once the user has clicked on the close button of my MDI form I do error
checking in the Closing event if errors have been found the form should
not be closed.
How can I prevent the form to be closed though ?

Thx
 
Sam said:
Once the user has clicked on the close button of my MDI form I do error
checking in the Closing event if errors have been found the form should
not be closed.
How can I prevent the form to be closed though ?

Set 'e.Cancel = True' in the event handler.
 

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

Back
Top