Private Sub TextBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Validated
If TextBox1.Text.Length > 10 Or TextBox1.Text.Length < 6 Then
ErrorProvider1.SetError(TextBox1, "รูปแบบรหัสผ่านไม่ถูกต้อง")
Else
ErrorProvider1.SetError(TextBox1, "")
End If
End Sub