Tanuj Kumar
Total Post:134
Points:940How do I prevent the caret going to the next line in a text box when the 'ENTER' key has been pressed? In other words how to disable the 'ENTER' or 'RETURN' key in a text-box?
Post:412
Points:2888Re: C# How do disable a key
Hi Tanuj,
You can write the OnKeyDown event. you can use the e.SuppressKeyPress to tell .NET that you handle the key. Something like this: