09-10-22, 02:58 AM
09-10-22, 05:06 AM
(09-10-22, 02:58 AM)عماد سلمان منذر كتب : [ -> ]لو سمحتم كيف استطيع ان لا اكتب ضمن التكست بوكس الا الارقام والاحرف الانكليزية
كود :
Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
If Not Char.IsNumber(e.KeyChar) AndAlso Not Char.IsLetter(e.KeyChar) AndAlso Not Char.IsControl(e.KeyChar) Then
e.Handled = True
End If
End Sub09-10-22, 12:43 PM
(09-10-22, 05:06 AM)trakktour كتب : [ -> ](09-10-22, 02:58 AM)عماد سلمان منذر كتب : [ -> ]لو سمحتم كيف استطيع ان لا اكتب ضمن التكست بوكس الا الارقام والاحرف الانكليزية
كود :
Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
If Not Char.IsNumber(e.KeyChar) AndAlso Not Char.IsLetter(e.KeyChar) AndAlso Not Char.IsControl(e.KeyChar) Then
e.Handled = True
End If
End Sub
ارغب ان لايكتب في التكست بوكس غير الحروف والارقام بالانكيزية