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.
Printable View
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.
since I dont have vb on this machine i cant test it, but try something like this...
I think that keycode is an argument to this event (?). Run the project and click the delete key. Might work.Code:'In a textbox keypress event
msgbox "Ascii = " & keycode
[Edited by seaweed on 03-24-2000 at 01:32 AM]
Nope Have Already Tried Something Similar To That. Does Not Display The Ascii. Any Other Help Would Be Greatly Appreciated. Appreciate The Help Though.
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.
There are also simular constants for other keys like:Code:If KeyCode = vbKeyDelete Then
'do whatever
End If
vbKeyDown
vbKeyLeft
vbKeyUp
vbKeyRight
vbKeyF1 -> vbKeyF12
vbKeyHome
vbKeyEnd
...and so on
Good luck!