NOTE: to see if you do this right and you are successful, you should be able to put anything in the textbox except s, S, d, D or the backspace key
'First of all you need to go to the code and choose the name of the text box. The name should be something like: txtType and choose KEYPRESS
It will generate this code:
Private Sub txtType_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtType.KeyPress
'This is the code you put in the Keypress sub
' allows the text box to accept only the letters
' S, s, D, and d and the Backspace key for editing.
If e.KeyChar <> "S" AndAlso e.KeyChar <> "s" AndAlso e.KeyChar <> "D" AndAlso e.KeyChar <> "d" AndAlso e.KeyChar <> ControlChars.Back Then
e.Handled = True
End If
Looks good Gill.
ReplyDeleteLooks awesome, I'll get right on it! :D
ReplyDeleteDone
ReplyDeleteI got it
ReplyDeleteBob Gill.... you code makes me want to sing
ReplyDeleteGots it! (:
ReplyDeleteGot it
ReplyDeleteThis is colter, Code works great
ReplyDeleteComment
ReplyDeleteGot it.
ReplyDeleteyes very nice
ReplyDelete