|
-
January 4th, 2000, 04:23 PM
#1
up/down arrow ASCII controls
i am looking for the ASCII numbers for:
DELETE (the button)
Up arrow
Down arrow
Left arrow
Right arrow
ASCII numbers as in 13 = ENTER, etc...
-
January 4th, 2000, 05:11 PM
#2
Re: up/down arrow ASCII controls
How about using the built in vb constants, eg :
private Sub Form_Load()
Debug.print "Delete = " & vbKeyDelete
Debug.print "Up = " & vbKeyUp
Debug.print "Down = " & vbKeyDown
Debug.print "Left = " & vbKeyLeft
Debug.print "Right = " & vbKeyRight
Debug.print "Enter = " & vbKeyReturn
End Sub
That should produce :
Delete = 46
Up = 38
Down = 40
Left = 37
Right = 39
Enter = 13
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
January 4th, 2000, 05:31 PM
#3
Re: up/down arrow ASCII controls
The easiest way to find any key code is to insert the following line into a form and run the program.
private Sub Form_KeyDown(KeyCode as Integer, Shift as Integer)
Debug.print "Down " & chr(KeyCode) & " Number = " & KeyCode
End Sub
Puch keys to your hearts content
Richard
-
January 5th, 2000, 02:26 AM
#4
Re: up/down arrow ASCII controls
What are you planning to do with arrow keys? These may work on a form which has no command buttons. Since these are used to move through the various controls on the form. The Form_KeyPreview may allow you to trap all keys except these arrow keys. You are better off using a form without any command buttons, use stylish 3DPanels instead.
Another option for you might be as follows.
Use number keys on the NumPad with the NumLock ON.
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
|