Validation
Numeric Validation :
Step 1 : Double Click On Text Box
Step 2 : And Go "KeyPress" Event
Step 3: Type The Code
-------------------------------------------------------------------------------------------------------------------------------
If e.KeyChar >= "0" And e.KeyChar <= "9" Or code = 8 Then
e.Handled = False
e.Handled = False
Else
e.Handled = True
End If
e.Handled = True
End If
-------------------------------------------------------------------------------------------------------------------------------
Character Validation :
Step 1 : Double Click On Text Box
Step 2 : And Go "KeyPress" Event
Step 3: Type The Code
-------------------------------------------------------------------------------------------------------------------------------
If (code >= 97 And code <= 122) Or (code >= 65 And code <= 90) Or code = 8 Or code = 32 Then e.Handled = False
Else
e.Handled = True
End If
End If
-------------------------------------------------------------------------------------------------------------------------------
e is a key char event that handle all key press event .In Character Validation Use ASCII Character To Check Character
No comments:
Post a Comment