Private Sub TxtNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TxtNo.KeyPress
If Asc(e.KeyChar) <> 8 Then
If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Or TxtNo.Text.Length > 9 Then
e.Handled = True
End If
End If
End Sub
If Asc(e.KeyChar) <> 8 Then
If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Or TxtNo.Text.Length > 9 Then
e.Handled = True
End If
End If
End Sub
No comments:
Post a Comment