Get keys
-
Hello! I'm trying to do a program that logs all the key presses of the keyboard. The application runs smooth (VisibleInTaskBar = false, Visible = false), but, by doing that, i lose the focus on my form. So, i would be interested if there is a way to "intercept" the key strokes from code. I've searched www.pinvoke.net -> and found this: GetKeyState, but, unfortunately, i wasn't able to implement this. I've also searched the articles, still... nothing relevant to this ... GetKeyState method or ways to implement it. Thanks a lot, Catalin David.
-
Hello! I'm trying to do a program that logs all the key presses of the keyboard. The application runs smooth (VisibleInTaskBar = false, Visible = false), but, by doing that, i lose the focus on my form. So, i would be interested if there is a way to "intercept" the key strokes from code. I've searched www.pinvoke.net -> and found this: GetKeyState, but, unfortunately, i wasn't able to implement this. I've also searched the articles, still... nothing relevant to this ... GetKeyState method or ways to implement it. Thanks a lot, Catalin David.
why not create a windows service project? I think this should do the trick.
-
Hello! I'm trying to do a program that logs all the key presses of the keyboard. The application runs smooth (VisibleInTaskBar = false, Visible = false), but, by doing that, i lose the focus on my form. So, i would be interested if there is a way to "intercept" the key strokes from code. I've searched www.pinvoke.net -> and found this: GetKeyState, but, unfortunately, i wasn't able to implement this. I've also searched the articles, still... nothing relevant to this ... GetKeyState method or ways to implement it. Thanks a lot, Catalin David.
drc_no1 wrote:
I'm trying to do a program that logs all the key presses of the keyboard.
What key presses do you want to log; only those of your application or system-wide?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
drc_no1 wrote:
I'm trying to do a program that logs all the key presses of the keyboard.
What key presses do you want to log; only those of your application or system-wide?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook