preventing Keystrokes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I am trying to prevent users from using the "Delete" and
"Backspace" keys on the keyboard in my application. Any help would be
greatly appreciated.

Thank You,

Brenton Walker Garman
 
Hello Brenton,

You can use code below for the specific controls in you app, but if you need
to handle for the whole app, use global hooks. Google for samples

if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Delete)
{
MessageBox.Show("Key is pressed");
}

BG> Hello. I am trying to prevent users from using the "Delete" and
BG> "Backspace" keys on the keyboard in my application. Any help would
BG> be greatly appreciated.
BG>
BG> Thank You,
BG>
BG> Brenton Walker Garman
BG>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top