Which event should I use for this?
Control.Leave or Control.LostFocus:
When you change the focus by using the keyboard (?, ?+?, and so on), by calling the Select or SelectNextControl methods, or by setting the ContainerControl.ActiveControl property to the current form, focus events occur in the following order: Enter GotFocus Leave Validating Validated LostFocus When you change the focus by using the mouse or by calling the Focus method, focus events occur in the following order: Enter GotFocus LostFocus Leave Validating Validated If the CausesValidation property is set to false, the Validating and Validated events are suppressed.
When you change the focus by using the keyboard (?, ?+?, and so on), by calling the Select or SelectNextControl methods, or by setting the ContainerControl.ActiveControl property to the current form, focus events occur in the following order:
When you change the focus by using the mouse or by calling the Focus method, focus events occur in the following order:
If the CausesValidation property is set to false, the Validating and Validated events are suppressed.
1.4m articles
1.4m replys
5 comments
57.0k users