日期:2014-05-18  浏览次数:20974 次

VS c# Windows窗体应用程序 控件事件列表中为什么没有获得焦点事件
VS c# Windows窗体应用程序 控件事件列表中为什么没有获得焦点事件

------解决方案--------------------
Enter事件
------解决方案--------------------
獲得焦點事件
this.Enter+=new System.EventHandler(Form1_Enter);
失去焦點事件
this.LostFocus+=new System.EventHandler(Form1_LostFocus);
另外,還有bool Controls.Focus()方法可判斷
------解决方案--------------------
onfocus Event

--------------------------------------------

Fires when the object receives focus. 

Event Information

Bubbles No 
Cancels No 
To invoke Click an object. 
Use keyboard navigation. 
Invoke the focus method. 
Invoke the setActive method. 
 
Default action Sets focus to an object.

查看MSDN