Click to See Complete Forum and Search --> : Delete key ASCII code


Chris B.
March 2nd, 2001, 10:33 AM
I was looking at the MSDN ASCII code's and I didn't see one for the "Delete" key. The closest thing I could find was code 127. That is a combination of the ctrl + backspace keys. As far a functionality goes that works, but I want this to react to the actual delete key. The Windows calculator is a good example. Hit the delete key and that clears the text box. I even tried to use the keypress event but when the delete key is pressed it doesn't fire off. Does anyone have any ideas on how to catch the delete key?

Thanks

Srikanth_hlp
March 2nd, 2001, 10:46 AM
Try to use sendkeys function to activate the delete key.

or just to trap delete key

You can go to keycode event of any control (not keypress event) and print the value being passed to the keypress event when u press delete key

- Srikanth

CK Dixon
March 2nd, 2001, 11:03 AM
The API is always there. Use GetAsyncKeyState() to detect if the Delete key has been pressed.