I created a usercontrol in c#, Leave and LostFocus are not fired if I switch to another program. How can I detect if the app loses focus?
Try your mainform's Deactivate event
2.1m questions
2.1m answers
60 comments
56.9k users