Starting with version 1.50, the VB6ControlArray class exposes two new events, Enter and Leave, which fire when an element of the array receives or loses the input focus. You can take advantage of these new events by decorating the control array declaration with the WithEvents keyword:
Private WithEvents txtFields As VB6ControlArray(Of VB6TextBox)
and then writing code such as this
Private Sub txtFields_Enter(ByRef index As Short) Handles txtFields.Enter
Private Sub txtFields_Leave(ByRef index As Short) Handles txtFields.Leave
Even better, you can use pragmas to add the WithEvents keyword and “transform” the GotFocus and LostFocus event handlers into hanlders of the new Enter/Leave events:
Please notice that the new Enter/Leave events “bypass” the standard event mechanism offered by the VB6Library: they are “pure” .NET events that can fire in any moment, including when the form is being loaded or a message box is being showed. When using these new events you should be prepared to handle such minor differences.