Results 1 to 4 of 4

Thread: Ascii For Delete Key

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9
    This Is Probably Another Simple Question For You All, But I am Still Learning. Can Anyone Tell Me The Ascii Or Coding For The Delete Key. I've Tried All The Ascii 1 to 256 but none worked. Please Help.

  2. #2
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Just an idea

    since I dont have vb on this machine i cant test it, but try something like this...

    Code:
    'In a textbox keypress event
    msgbox "Ascii = " & keycode
    I think that keycode is an argument to this event (?). Run the project and click the delete key. Might work.

    [Edited by seaweed on 03-24-2000 at 01:32 AM]
    ~seaweed

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9

    Nope

    Nope Have Already Tried Something Similar To That. Does Not Display The Ascii. Any Other Help Would Be Greatly Appreciated. Appreciate The Help Though.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    The delete key doesn't have an ascii value. But you can use the KeyDown event insted of the KeyPressed event. It has a KeyCode argument instead of the KeyAscii argument.
    Code:
    If KeyCode = vbKeyDelete Then
        'do whatever
    End If
    There are also simular constants for other keys like:
    vbKeyDown
    vbKeyLeft
    vbKeyUp
    vbKeyRight
    vbKeyF1 -> vbKeyF12
    vbKeyHome
    vbKeyEnd
    ...and so on

    Good luck!

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