CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 1999
    Location
    Texas
    Posts
    119

    Delete key ASCII code

    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


  2. #2
    Join Date
    Mar 2001
    Posts
    91

    Re: Delete key ASCII code

    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


  3. #3
    Join Date
    Jun 2000
    Location
    Nepal
    Posts
    108

    Re: Delete key ASCII code

    The API is always there. Use GetAsyncKeyState() to detect if the Delete key has been pressed.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured