|
-
Mar 15th, 2019, 10:49 PM
#14
Re: How to disallow non-numeric letters in WinForms TextBox?
 Originally Posted by kpmc
You could throw in a condition for your modifier keys if you want to use the other numbers
Or you could do as I said in post #8 and use KeyData instead of KeyCode. KeyData is the combination of current modifier keys and the key that was just depressed so if that is equal to just a digit or number pad key then you know that no modifier keys were depressed. That will then also exclude keys depressed with Ctrl, Alt or Ctrl+Alt as well.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|