
textBox5LostFocus+=newEventHandler(txt_LostFocus);//失去焦点后发生事件
textBox5GotFocus+=newEventHandler(txt_GotFocus);//获取焦点前发生事件
textBox5MouseClick+=newMouseEventHandler(textBox5_MouseClick);//鼠标点击事件
newEventHandler(txt_LostFocus);
voidtxt_LostFocus(objectsender,EventArgse)
{
txtInput(textBox5);
}
扩展资料
C#WinForm窗体获得焦点时即触发事情
usingSystem;
usingSystemCollectionsGeneric;
usingSystemComponentModel;
usingSystemData;
usingSystemDrawing;
usingSystemText;
usingSystemWindowsForms;
namespaceWindowsApplication3
{
publicpartialclassForm1:Form
{
publicForm1()
{
InitializeComponent();
}
privatevoidbutton1_Click(objectsender,EventArgse)
{
Form2obj=newForm2(thislabel1);
objShow();
}
}
}
以上就是关于C# 得到焦点触发的事件 怎么实现 或者失去焦点触发事件全部的内容,包括:C# 得到焦点触发的事件 怎么实现 或者失去焦点触发事件、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)