I have created a standard windows forms application in Visual Studio 2010.
public ref class Form1 : public System::Windows::Forms::Form
{
...
}
I want to capture keydown events globally (if I am in an other application, my form shall react to keydowns too).
Haw can I implement the event listener?
Thanks for help.
You need a global hot key i guess. For that its needed an API call.
It tells you how to do it
Edit:
Sorry didnt noticed that you wanted the code on cpp.
here is the right link:
http://www.codeproject.com/Articles/2213/Beginner-s-Tutorial-Using-global-hotkeys