meph
meph

Reputation: 209

How to check if a key press or not while i'm not in the form?

I have a form that is running but not in the focus. Now I want to press CTRL + NUM1 so the form which is not in the foreground catches it.

How can I achieve this?

Upvotes: 1

Views: 170

Answers (1)

Numan
Numan

Reputation: 3948

It should be possible with a keyboard hook, which your application installs when it starts up and remove it on an app close.

This should get you started, you need to know/understand fundamentals of Win32 API for this! http://www.codeproject.com/Articles/7294/Processing-Global-Mouse-and-Keyboard-Hooks-in-C

Upvotes: 1

Related Questions