You can use event Leave
private void txtbox_Leave(object sender, EventArgs e)
{
}
You can also use
private void txtbox_LostFocus(object sender, EventArgs e)
{
}
Leave()the event first executes the keyboard event, and then the mouse event, where as the LostFocus()event the mouse event is first executed, and then the keyboard event is executed.
(TAB, SHIFT + TAB ..),
1. Enter
2. GotFocus
3. Leave
4. Validating
5. Validated
6. LostFocus
, :
1. Enter
2. GotFocus
3. LostFocus
4. Leave
5. Validating
6. Validated