WinForms event for TextBox focus?

前端 未结 4 983
醉梦人生
醉梦人生 2021-02-07 08:13

I want to add an even to the TextBox for when it has focus. I know I could do this with a simple textbox1.Focus and check the bool value... but I don\'

4条回答
  •  感情败类
    2021-02-07 08:48

    You're looking for the GotFocus event. There is also a LostFocus event.

    textBox1.GotFocus += textBox1_GotFocus;
    

提交回复
热议问题