Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I know how to code the e handled procedure to allow only numbers and special characters, but how can you code the keypress event e handled procedure to allow only alphebetical characters without a bunch of or statements?

 

Thanks, Chester

____________________________________________

http://www.pophamcafe.com

I am starting a developers section, more tutorials than anything.

  • *Experts*
Posted

This method is much better:

If Not Char.IsLetter(e.KeyChar) Then
  e.Handled = True
End If

The shared method of the char will tell you if the character is a letter, lower or uppercase.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...