Hello.If somebody know's the KeyAscii for PageUp and PageDown please mail me to: [email protected], thanks.
Printable View
Hello.If somebody know's the KeyAscii for PageUp and PageDown please mail me to: [email protected], thanks.
PageUp- 33Quote:
Originally Posted by mainar
Pagedown - 34
Remember you cannot trap these keys in KeyPress Event. You will either have to use KeyUp or KeyDown Event.
And don't put your emailId out here.
If you want to find any keyAscii value just place in the keypress event on a form or object the following code.
Code:
Text1.Text = KeyAscii
Then everytime you press a key the textbox will display the value of that key.
Rich
That wouldn't work, since Page Up and Page Down do not have ASCII values.Quote:
Originally Posted by Rich2189
In VB, they do have key codes (designated as 33 for vbKeyPageUp and 34 for vbKeyPageDown), so you can check for them in KeyUp and KeyDown events, but not in KeyPress events.
You can also find other keys (like Shift, Caps Lock, Home, End, Insert, Delete, all the Function keys, and so on) only through KeyUp and KeyDown, since they don't have ASCII values.
:) i feel like a dunce now, im doing KeyAscii in college at the moment, of course it doesnt have a value, thanks chaos, now i know how to get the arrow keys to work :)
Rich
Another great way to get ascii key values... use the VB constants
i.e.
vbKeyPageDown, vbKeyPageUp, vbKeyF1 etc etc etc