c#控件失去焦点事件是什么?

如题所述

如下代码事件。

    textBox5.LostFocus += new EventHandler(txt_LostFocus); //失去焦点后发生事件  

    textBox5.GotFocus += new EventHandler(txt_GotFocus);  //获取焦点前发生事件  

    textBox5.MouseClick += new MouseEventHandler(textBox5_MouseClick); // 鼠标点击事件  

在输入 += 后,按两次  Tab 键,就会出现后面的

    new EventHandler(txt_LostFocus);  

    void txt_LostFocus(object sender, EventArgs e)  

    {  

    txtInput(textBox5);  

    }  

    温馨提示:内容为网友见解,仅供参考
    无其他回答
    相似回答
    大家正在搜