I want to close a System.Windows.Forms.Form if the user clicks anywhere outside it. I\'ve tried using IMessageFilter, but even then none of the messages are passed to PreFi
You should use Deactivate:
I have a form called Form2.
In the Deactivate section of the Properties window.
You declare the name Form2_Deactivate.
In the Form2.cs file: