Results 1 to 5 of 5

Thread: Keydown with buttons useage

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2008
    Posts
    76

    Keydown with buttons useage

    Hi

    I am trying to use the keydown/keyup events with buttons in the same project and it not working properly. I have 4 red boxes and when I press an arrow key the box should change to green according to which arrow key it corrosponds to. I have this part working fine, however only when there is nothing else in the project. When I add in say 3 buttons, Button1, Button2, Button3 and try runing the program instead of the correct red box changing to green, button outline just moves between buttons 1,2 and 3. I have tried turning tabstop off for the three buttons but that didnt work. Any suggestions on how to read the keydown/keyup while still having buttions that can be pressed with a mouse??

    Thanks for your help.

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Keydown with buttons useage

    I can't think of any reason why it shouldn't work.

    Can you show us what code you have at the moment.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2008
    Posts
    76

    Resolved Re: Keydown with buttons useage

    I Found another post with my same problem and I have it fixed now. Thanks for your responce though. You can read the post at, kind of a weard problem though.

    http://www.vbforums.com/showthread.p...keydown+button

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Dec 2008
    Posts
    76

    Re: Keydown with buttons useage

    Well I thought it solved my problem, turns out I still cannot detect when the arrow keys are up or down? Any suggestions to this?

  5. #5
    Fanatic Member Vectris's Avatar
    Join Date
    Dec 2008
    Location
    USA
    Posts
    941

    Re: Keydown with buttons useage

    Read my post in that topic, just use labels. Same as buttons but they don't hog the focus, and they don't look like buttons...
    If your problem is solved, click the Thread Tools button at the top and mark your topic as Resolved!

    If someone helped you out, click the button on their post and leave them a comment to let them know they did a good job

    __________________
    My Vb.Net CodeBank Submissions:
    Microsoft Calculator Clone
    Custom TextBox Restrictions
    Get the Text inbetween HTML Tags (or two words)

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