19-01-14, 01:22 PM
19-01-14, 03:23 PM
في حدث KeyPress الخاص بالـ TextBox ضع الكود التالي
كود :
If Not Char.IsControl(e.KeyChar) Then
If Not Char.IsDigit(e.KeyChar) Then
e.Handled = True
End If
End If19-01-14, 04:40 PM
السلام عليكم لقد إستفدت من هدا الموضوع شكرا لكم
19-01-14, 04:53 PM
وهنا في نفس الحدث لكن يقبل نص فقط
If Char.IsControl(e.KeyChar) = False Then
If Char.IsDigit(e.KeyChar) Then
e.Handled = True
End If
End If
If Char.IsControl(e.KeyChar) = False Then
If Char.IsDigit(e.KeyChar) Then
e.Handled = True
End If
End If