How to add a listener to the keyboard pressed action when the focusis not on the program?

F

fts2012

Hi all, I want to realize a function which could remember the latest
several items in clipboard.
I hava alreay known the method get the pressed keys when my program is
on active ,but I don't know the way to get the keys when others
programs are on active.
Can anybody tell me how to listen to the global keys' pressing
action $B!)(B
Thanks .
 
K

kimiraikkonen

Hi all, I want to realize a function which could remember the latest
several items in clipboard.
I hava alreay known the method get the pressed keys when my program is
on active ,but I don't know the way to get the keys when others
programs are on active.
Can anybody tell me how to listen to the global keys' pressing
action £¿
Thanks .

Hi,
That article helps you to reach your application with a keypress even
if your application is not active:
(note: Don't forget to import system.runtime.interopservices)
http://www.dotnet2themax.com/ShowContent.aspx?ID=103cca7a-0323-47eb-b210-c2bb7075ba78

Hope this helps,

Onur G¨¹zel
 
F

Family Tree Mike

I wouldn't think a global keyboard hook plays a role in the monitoring of the
clipboard. You would just periodically, in a timer event, look at the
Clipboard contents. As far as a keyboard listener, you have you have been
pointed in a directon toward that.
 

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