textbox event on 'delete' key

  • Thread starter Thread starter Cystm
  • Start date Start date
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
*-----------------------*
 
KeyPress event may not be useful for non-character keys. Use KeyDown or
KeyUp event for the same.

+Rajesh R
 
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
*-----------------------*
 
Back
Top