blejzz
blejzz

Reputation: 3349

hide form when user clicks elsewhere

i have application with one form, which i developed in c#. I would like to hide the form when a user clicks somewhere else then on the form or on the notification icon (in system tray). How could i do that?

Upvotes: 2

Views: 763

Answers (1)

Davide Piras
Davide Piras

Reputation: 44595

I am not 100% sure you can do it with the standard event exposed by Visual Studio in the designer but if you could attach to the DeActivate event, or form lost focus, then you can call form.Hide

Upvotes: 2

Related Questions