Hey all,
I have a picture box, and I want to detect whether the ctrl key is being pressed.
Since I want to simulate... ctrl and left click for multiple selections.
what I have done:
1. set beingpressed as boolean
2. in keyDown event, I set beingpressed to true
3. in keyUp event, I set beingpressed to false
My problem is:
sometimes the keyUp event is invoked while the program is executing some other process. so the program cannot "catch" that keyUp. Then the program will assume that (ctrl key) beingpressed is always true until the rest of the time... which is dangerous... :(
Do you have any idea to work around this?
Sounds like concurrency problem that I have here...
How can somehow I check the ctrl key status (whether it is being pressed or not) without using keyUp and keyDown event?
thanks