Monday, 16 September 2013
C# .NET Textbox GotFocus Event
Posted on 06:18 by Unknown
When one Googles to find out sample code for a C# .Net textbox gotFocus() event, the first few search results are not that explicit. So without further ado, here is a sample:
In the Form_Load method:
textBox2.GotFocus += new System.EventHandler(this.textBox2_GotFocus);
And then in the body of the form class you create this method:
private void textBox2_GotFocus(Object sender, EventArgs e)
{
// do something here
}
Hope this helps someone.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment