• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

How do I disable the <Enter> key in a textbox of a form in C#

Can someone provide me with an example of how to disable the <Enter> key in C# for a textbox on a form?
0
sriley07
Asked:
sriley07
  • 2
1 Solution
 
oleggoldCommented:
http://www.astahost.com/Disable-Enter-Key-Input-Text-Box-t17280.html
if (e.KeyCode == Keys.Enter) {
            e.SuppressKeyPress = false;
        }

Open in new window

0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now