|
-
Mar 23rd, 2000, 01:21 PM
#1
Thread Starter
New Member
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.
-
Mar 23rd, 2000, 01:31 PM
#2
Frenzied Member
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]
-
Mar 23rd, 2000, 01:38 PM
#3
Thread Starter
New Member
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.
-
Mar 23rd, 2000, 04:34 PM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|