P1ST0LPETE
asked on
Capture Multiple key press in C#
Hi all,
I have a "secret" windows form that I want to load when multiple keys are pressed at the same time. How can I do this is C#, starting from my main form?
Thanks
I have a "secret" windows form that I want to load when multiple keys are pressed at the same time. How can I do this is C#, starting from my main form?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm fine with pressing the keys in the correct order, however I'm not getting it to work. The "S" key, which is one of the 5 letters is not working. If I replace the "S" with another letter, then it works, but with the S in it, it won't fire. Obviously the "S" on my keyboard is working or I wouldn't be able to type them out in this sentence. I even tried putting a conditional breakpoint on the methed to try and catch the S, and it's not working either. What's the deal with the "S" key? Does it hold a special hex falue similar to the shift key?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well I was using the name of the company I work for which ends in an S, but I fine with not using it. I'll just play around with it until I find a combo that I like and the system accepts. I've got a good understanding of how it woks though now, so I should be good, thanks for the help.
ASKER
Thanks for all the help pivar.
Also thanks Idle Mind for the extra info.
Also thanks Idle Mind for the extra info.
ASKER
Your solution looks similar to what I was trying to work with already when I got stuck. I have another question for clarification though. In the IF statement "if(keys == yourkeycombination)", what exactly do I put in for "yourkeycombination"? The key combination I'm going for is: SHIFT + 5 letter keys.