Results 1 to 2 of 2

Thread: get combination of pressed keys

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2002
    Posts
    79

    get combination of pressed keys

    In my form I have set the KeyPreview property to true. How can I get the combination of keys (e.g. ctrl + shift + s) the user pressed? I thought it must be within the KeyDown event but the way I tried I only got to know one of the keys being pressed.

  2. #2
    Junior Member
    Join Date
    Dec 2001
    Posts
    18
    Hi,

    I tried to do something similar a while ago and I don't have the code in front of me now but from memory, I used the key down event and put something similar to this in the event

    if e.alt and e.keyvalue = keys.C then
    do something.....
    endif

    I was trying to trap the user pressing ALT & C, but you could use something similar to trap any key sequence.

    Its a bit different from the old way of doing it in VB but I think its quite good.

    Hope this helps
    Last edited by VBDon; Jun 7th, 2002 at 10:10 PM.

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