08-11-21, 04:18 PM
طيب عدل الحدث الى مايلي
كود :
Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
If Regex.IsMatch(e.KeyChar, "[^\u0621-\u064Aa-zA-Z\s\u0000-\u001f]") Then
e.Handled = True
MsgBox("الاحرف فقط مسموحة")
End If
End Sub
