textbox event on 'delete' key

C

Cystm

I am trying to create a custom text box that performs a function on
every key press, and it works perfectly, except that the 'delete' key
(and the arrow keys) does not fire an event.

textBox1_KeyPress is called on every other key, including backspace,
but delete simply deletes a character from the text in the box and
does not fire the event. How can I catch this keypress?

Any help would be appreciated...

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
R

Rajesh R

KeyPress event may not be useful for non-character keys. Use KeyDown or
KeyUp event for the same.

+Rajesh R
 
S

Shiva

Hi,
KeyPress handles only character key presses. For Del, you will have to
handle KeyUp or KeyDown events.

HTH.

I am trying to create a custom text box that performs a function on
every key press, and it works perfectly, except that the 'delete' key
(and the arrow keys) does not fire an event.

textBox1_KeyPress is called on every other key, including backspace,
but delete simply deletes a character from the text in the box and
does not fire the event. How can I catch this keypress?

Any help would be appreciated...

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 

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

Top