.NET事件的应用程序失去和获得焦点 [英] .NET Event for Application losing and gaining focus

查看:147
本文介绍了.NET事件的应用程序失去和获得焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种简单的方法来检测,当.NET应用程序获得或失去焦点?

Is there an easy way to detect when a .NET app gets or loses focus?

推荐答案

您正在寻找的事件是<一href="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.activated.aspx">Form.Activated和<一href="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.deactivate.aspx">Form.Deactivated

这篇关于.NET事件的应用程序失去和获得焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆