Hi - is there any way to detect when an arrow key is being pressed? Specifically, in a DataGrid I need to know when the user is pressing an arrow key, but I can't find any vbconstant like vbKeyReturn or anything else useful.
Thanks,
Andrew
Printable View
Hi - is there any way to detect when an arrow key is being pressed? Specifically, in a DataGrid I need to know when the user is pressing an arrow key, but I can't find any vbconstant like vbKeyReturn or anything else useful.
Thanks,
Andrew
Instead of KeyPress, look for help on the KEYDOWN event.
The keycodes are 37 (left), 38 (up), 39 (right), & 40 (down)
for the arrow keys. The VB constants are vbKeyLeft,
vbKeyRight, vbKeyUp and vbKeyDown.
[Edited by jcouture100 on 04-25-2000 at 04:39 PM]
Code:vbkeyup
vbkeydown
vbkeyleft
vbkeyright
Thanks guys. Man that was 2 fast replies! 'Preciate it, as always.
Andrew