Private Sub ValidateNameTextBox(ByRef TB As TextBox)
If Not TB.Text = String.Empty Then
TB.Text = TB.Text.Substring(0, 1).ToUpper() & TB.Text.Substring(1, TB.Text.Length - 1).ToUpper()
TB.SelectionStart = TB.Text.Length
End If
End Sub
Private Sub Textbox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Textbox1.TextChanged
ValidateNameTextBox(Me.Textbox1)
End Sub
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment