Results 1 to 4 of 4

Thread: Arrow Keypress

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Question

    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

  2. #2
    Addicted Member jcouture100's Avatar
    Join Date
    Aug 1999
    Posts
    141
    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]
    JC

  3. #3
    Addicted Member
    Join Date
    Mar 2000
    Location
    Gainesville, FL
    Posts
    131
    Code:
    vbkeyup
    vbkeydown
    vbkeyleft
    vbkeyright

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Cool

    Thanks guys. Man that was 2 fast replies! 'Preciate it, as always.

    Andrew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width