Oct 18, 2006 #1 rr3news Programmer Apr 15, 2003 15 BR Hi, I need your about: 1 - How can I disable a ESC key on C# (Winform) ? Thanks
Oct 18, 2006 #2 JurkMonkey Programmer Nov 23, 2004 1,731 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.