03-05-19, 12:20 AM
(آخر تعديل لهذه المشاركة : 03-05-19, 12:21 AM {2} بواسطة اسامه الهرماوي.)
السلام عليكم...
حول كل الحقول إلي نصوص وقيد المستخدم بالكود التاالي من البرنامج.
حول كل الحقول إلي نصوص وقيد المستخدم بالكود التاالي من البرنامج.
كود جعل الأداة تكتب نصا وليس رقما
كود :
Private Sub t1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles t1.KeyPress
'place
If Char.IsControl(e.KeyChar) = False Then
If Char.IsDigit(e.KeyChar) Then
e.Handled = True
End If
End If
End Subكود جعل الأداة تكتب رقما وليس نصا
كود :
Private Sub t2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles t2.KeyPress
'number
If Char.IsNumber(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
e.Handled = True
End If
End Subالمبرمج لا يفكر في المشكلة بل في الحل!!

