For example, consider the following VB6 code: Private Sub Text1_Got Focus() Text1.
Back Color = vb Yellow End Sub Private Sub Text1_Lost Focus() Text1.
I'd suggest hooking all the Text Changed events to one Sub (select them all in the IDE then add the event) and build a SELECT CASE based on the Text Box name.
I wouldn't worry about efficiency when deal with the UI.
Below code is done in the windows functionality we need in the wpf pages.
NET controls is in the order in which they fire the Lost Focus and Validate events.
I am sending VB6 Code blow which in on single form with two text boxes.
Lost focus only fires when the user moves focus from that control to another one.
The validated event fires at the point of validation.
Text, "#0.00") End Sub Private Sub Text2_Got Focus() Me.
Also, you can just use "Select All" Check this Code: Private Sub Text Box1_Enter(By Val sender As Object, By Val e As System.