Click here to Skip to main content
15,795,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a textbox that is used for naming something.I need to make it so it doesn't accept these characters / | \"" < > ? * . Any help is appreciated. I would like to make it that it doesn't even enter them into the tbox like windows 7 does but i dont Know how.Thanks In Advance!!

What I have tried:

i tried excluding them but if i enter more than one in it with letters in between it doesnt kick it out.
Updated 2-May-18 5:12am
BillWoodruff 2-May-18 10:48am    
You can easily solve this problem using the recently posted code examples shown here:
Rob Philpott 2-May-18 12:32pm    
Yep. I like the keypress intercept - it's a classic!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900