Results 1 to 3 of 3

Thread: keyboard arrows

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2002
    Location
    UK
    Posts
    38

    Angry keyboard arrows

    i'm using the _KeyDown event and it works for some buttons on the keyboard but not all of them.

    If KeyCode = vbKeyRight Then....

    if i play it then it doesn't do what it supposed to if theright arrow button's pressed.

    pleez help!!

  2. #2
    Junior Member
    Join Date
    Mar 2002
    Posts
    26
    play what?
    and what are you trying to do?

    assign a key to code like a command button?

    what keys are you wanting etc?


  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2002
    Location
    UK
    Posts
    38
    play it meaning run the program

    I'll use a label as and example:
    if i wanted it to go red i could do this

    Label1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyR Then
    Label1.Backcolor = vbRed
    End If

    when you press R it'll change the background colour of the label to red

    if i wanted the button pressed to be the right arrow instead of R then it would be

    If KeyCode = vbKeyRight Then ... etc.

    but this doesn't work and it should

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