Key pressed

B

Bruno Xavier

Does anybody know how I can capture the key pressed even
if the focus is not on my application?

I am using the object Timer. I don't want to use KeyDown
event because the focus usually is not on my application.

Thank you!
 
1

100

Hi Bruno,
If the focus is not in your application the only way IMHO is to install a
system hook. How the hooks work you can read in MSDN
ms-help://MS.MSDNQTR.2003FEB.1033/dnwui/html/msdn_hooks32.htm. Read also the
documentation about SetWindowsHookEx API. How to install hooks from manages
application and some problems releated to it you can find in .NET
newscroups. Such a questions were asked before. Poll Google and I believe
you can find some info about it.

HTH
B\rgds
100
 

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