views:

21

answers:

1

Hi,

I am facing a problem to implement the delete functionality. The Key_Down event is not getting raised when I pressed a delete key from Keyboard. If I implement the Key_Press OR Key_Up Event.

Suppose I have selected some Text from RichTextBox and pressed the DEL, then the text get removed first and then it reaches to the Event code(Key_Press OR Key_Up Event).

Can anybody help me to resolved this?

A: 

If you are trying to check for the delete key you could try the KeyPreview event. That should fire before the KeyPress or KeyDown events.

pstrjds