How is a Del represented in a KeyPress event?

  • Thread starter Thread starter OC
  • Start date Start date
It's the KetData property of the KeyEventArgs. I don't know if you get the
KeyEventArgs parameter on a KeyPress, check out the KeyDown or KeyUp events
instead.

void Control_KeyDown(Object sender , KeyEventArgs e) {
if (e.KeyData == Keys.Delete) {...}
}
 

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