Oct 18, 2006 #1 rr3news Programmer Joined Apr 15, 2003 Messages 15 Location BR Hi, I need your about: 1 - How can I disable a ESC key on C# (Winform) ? Thanks
Oct 18, 2006 #2 JurkMonkey Programmer Joined Nov 23, 2004 Messages 1,731 Location CA On your form (assuming you are using a form) turn KeyPreview = true; Then capture the OnKeyDown event and add this code: private void Form1_OnKeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Esc) { e.Handled = true; } } done. Upvote 0 Downvote
On your form (assuming you are using a form) turn KeyPreview = true; Then capture the OnKeyDown event and add this code: private void Form1_OnKeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Esc) { e.Handled = true; } } done.