Close a form when you click outside of the form

  • Thread starter Thread starter Alex St-Pierre
  • Start date Start date
A

Alex St-Pierre

Hi !
I'm wondering if there's a way to close a form automaticaly when you click
outside of the form.
Thank you!
Alex
 
If you are showing the form Modal, which is default, then clicking outside
the form does nothing because the form retains forcus and everthing else is
disabled. If you show the form Modeless, you would have to write the code to
react to a range object or another control object with and event that would
react to the click event.
It seems like a lot of trouble when you can just as easily write code for
the click event of the form itself to close it, unless you are trying to be
punitive to a user who is fooling around with your form.
 

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