473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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 .
Jun 27 '08 #1
3 2601
On Apr 26, 2:15 pm, "fts2...@gmail.com" <fts2...@gmail.comwrote:
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/ShowCon...0-c2bb7075ba78

Hope this helps,

Onur G¨¹zel
Jun 27 '08 #2
Many Thanks

Regards
Jun 27 '08 #3
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.

"ft*****@gmail.com" wrote:
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 .
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Scott Shaw | last post by:
Hi all, I was wondering if you could help out with this problem that I am having. What I am trying to do is detect keyboard input in a while loop without halting/pausing the loop until the key is...
3
by: Lachlan Hunt | last post by:
Hi, I've been looking up lots of documentation and trying to work out a cross-platform method of capturing a keyboard event and working out which key was pressed. From what I can find, there...
3
by: Tegdeep | last post by:
Here's what I want to do: I have a hash table which contains data associated to different keys. The Hash keys are represented by a single character from the keyboard: 0-9, a-z, A-Z, and the...
2
by: Roger | last post by:
I have an application that I want to run in the background until F7 key is pressed. Does anyone know how to implement a listener for F7 keypress to activate application?
2
by: Don | last post by:
I've got a loop from within which I make a call to the API function GetAsyncKeystate to see if the Escape key was pressed. If it is, then the exit condition of the loop is met and the program goes...
5
by: bmerlover | last post by:
I currently have a gui app I programmed with visual c++ .net version. Is there any way I can read any character from the keyboard as soon as any key is pressed while the application is running? My...
9
by: Kbalz | last post by:
I have an application that minimizes itself, and I want it to listen for certain key commands, and when they are pressed, my program can react to them. So far I've gotten my application to react...
2
by: Brice Rebsamen | last post by:
Hi I wrote the following program that reads the keyboard in medium raw mode (keycode mode). Here is the initialization code, the full code is at the end. fd = open("/dev/tty0", O_RDONLY);...
3
by: NaN | last post by:
I've been trying to use _kbhit() but it didn't do what I thought it would from books, "Detects whether a keypress is available for reading." Herbert Schildt says, "If the user has pressed a key,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.