如何当一个应用程序失去焦点检测? [英] How to detect when an application loses focus?
本文介绍了如何当一个应用程序失去焦点检测?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建在C#中的usercontrol,离开,如果我切换到另一个程序引发LostFocus不会被触发。我如何检测如果应用程序失去焦点?
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?
推荐答案
试试你的MainForm的停用事件
Try your mainform's Deactivate event
这篇关于如何当一个应用程序失去焦点检测?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文