05-15-2011, 07:14 PM
The gui is derive from this forum. hehehe
I just used simple codes and used in keypress event.
Full Codes:
Edit: Ooops I have a grammar error in the description.
I just used simple codes and used in keypress event.
Full Codes:
Code:
Public Class Form1
Private Sub RichTextBox1_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles RichTextBox1.KeyPress
If (e.KeyChar < "a" OrElse e.KeyChar > "z") AndAlso (e.KeyChar < "A" OrElse e.KeyChar > "Z") Then
e.Handled = True
End If
End Sub
Private Sub RichTextBox2_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles RichTextBox2.KeyPress
If e.KeyChar < "0" Or e.KeyChar > "9" Then
e.Handled = True
End If
End Sub
End Class
Edit: Ooops I have a grammar error in the description.