You are on page 1of 1

If Char.IsNumber(e.

KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
MessageBox.Show("ingrese solo nmeros")
End If
Static c As Integer
c = c + 1
If c = 1 Then
Label1.ForeColor = Color.Gray
ElseIf c = 2 Then
Label1.ForeColor = Color.Black
ElseIf c = 3 Then
Label1.ForeColor = Color.Gray
Else : c = 4
c = 0
End If

You might also like