Hooking the keyboard

F

Fabiano

Please,

is there a way i can hook the keyboard? I would like to hook everykey.
CTRL+ALT+DEL, CTRL+ESC, and all others. The user just press some keys, and
none control keys, not only at my app but all windows.
A friend told me that there's a non-documented API that let me do this, but
he didn't remember the name.

Danke.

Fabiano
 
S

Scott Allen

The API is documented, look at SetWindowsHookEx and
UnhookWindowsHookEx in the Win32 API.
 
K

kurotsuke

Please,

is there a way i can hook the keyboard? I would like to hook everykey.
CTRL+ALT+DEL, CTRL+ESC, and all others. The user just press some keys, and
none control keys, not only at my app but all windows.
A friend told me that there's a non-documented API that let me do this, but
he didn't remember the name.

Danke.

Fabiano

I'm working on hooks too. You can take a look at CodeProject. There
are a couple of articles that may help you.
http://codeproject.com/csharp/globalhook.asp
http://www.codeproject.com/csharp/GlobalSystemHook.asp

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top