In a VB.Net 2017 Windows Forms application I'm developing, I have a data entry form with multiple text boxes. When the application runs and the user navigates between textboxes using the Tab or Shift-Tab keys, what happens when each textbox gets the focus is not consistent. In some cases, the cursor is located at the end of the existing text, in other cases the entire existing text is selected, and in others only part of the existing text is selected. For a few of the textboxes I've coded a Leave event handler, each of which merely calls one of the routines shown below, but I've not coded ANY Enter or GotFocus event handlers, nor have I included any code that attempts to manually select any text. This makes no sense to me because the Leave event only fires when the textbox loses focus, and should have no effect on what happens when the textbox gets the focus.

Can anyone explain why this is happening?

Code:
    Public Sub DateBoxLeave(txt As TextBox)
        With txt
            .Text = .Text.Trim
            If (.Text.Length > 0) Then
                If IsDate(.Text) Then
                    .Text = Format(Convert.ToDateTime(.Text), DateShowFormat)
                    .BackColor = SystemColors.Window
                Else
                    .BackColor = WarningBackColor
                End If
            Else
                .BackColor = SystemColors.Window
            End If
        End With
    End Sub
    Public Sub PhoneBoxLeave(txt As TextBox)
        With txt
            .Text = .Text.Trim
            If IsAllDigits(.Text) Then
                Select Case .Text.Length
                    Case 7
                        .Text = .Text.Substring(0, 3) & "-" & .Text.Substring(3, 4)
                    Case 10
                        .Text = .Text.Substring(0, 3) & "-" & .Text.Substring(3, 3) & "-" & .Text.Substring(6, 4)
                    Case Else
                        'do nothing for other phone number lengths
                End Select
            End If
        End With
    End Sub
    Public Sub StateBoxLeave(txt As TextBox)
        With txt
            .Text = .Text.Trim
            If .Text.Length = 0 Then
                .BackColor = SystemColors.Window
            Else
                If IsValidState(.Text) Then
                    .Text = .Text.ToUpper
                    .BackColor = SystemColors.Window
                Else
                    .BackColor = WarningBackColor
                End If
            End If
        End With
    End Sub
    Public Sub ZipCodeBoxLeave(txt As TextBox)
        With txt
            .Text = .Text.Trim
            If .Text.Length = 0 Then
                .BackColor = SystemColors.Window
            Else
                If IsValidZipCode(.Text) Then
                    If .Text.Length = 9 Then
                        .Text = .Text.Substring(0, 5) & "-" & .Text.Substring(5, 4)
                    End If
                    .BackColor = SystemColors.Window
                Else
                    .BackColor = WarningBackColor
                End If
            End If
        End With
    End Sub