LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I monitor keystrokes without having Window focus?

I have a production machine with a PC based HMI. The HMI is the foremost window as it should be. My VI runs in the background on the same PC. It collects data from various components and FTP’s the data out at the end of the day. I would like to have my VI move foremost when a series of keystrokes are entered. This would allow the different operators to see some of the data while it was being collected. The problem is when my VI does not have focus none of the keyboard examples I have tried work.  Thanks for any help!

0 Kudos
Message 1 of 5
(3,299 Views)
Gee, I was having just the opposite problem: my VI was reacting to keystrokes (specifically, the arrow keys) even when it didn't have focus.  (I got around it by adding a button to toggle keystroke monitoring.)

What examples have you been trying?
0 Kudos
Message 2 of 5
(3,294 Views)
Some examples that call user 32 dll. Also in LabView 8 they have the input device control (keyboard) and someone had also made a nice LLB file called WINKEY.llb. They all had the same result. Thanks
0 Kudos
Message 3 of 5
(3,282 Views)
I'm not sure what you're referring to, but for me the "Basic Input Demo" example included with LabVIEW (which I guess uses that "input device control") appears to register keystrokes regardless of whether the window has the focus or not.


Message Edited by kehander on 12-04-2007 03:27 PM
0 Kudos
Message 4 of 5
(3,276 Views)
Yes, that does appear to work. Not sure how I mised that but thanks for the help!
0 Kudos
Message 5 of 5
(3,269 Views)