From: Marco Tedaldi <[EMAIL PROTECTED]>
To: George Zou <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: [W] Capturing the keyboard
Date: Wed, 19 May 2004 08:43:24 +0200

George Zou wrote:
Marco,

Are you sure the video stops playing because loose the focus?
Is it posible because loose foreground?

Oh, that's a really interesting question. I can't answer this, because I don't know a way of letting the Application loose focus without loosing foreground too :-(
Would it make any difference?

It might be.

Have you tried to set the video window as topmost window ?

No, not until now. But I don't think this application has a setting like "always on top" or something like this :-(

You can do this with lvwutil32.zip. You can download it from NI site.

It is indeed posible to capture keyboard events from another
application,  but it's not easy.

What do you mean with "not easy"?
I've managed to geht the keypresses, that's easy, but I could not supress them for the other applications.

You are polling. That's not event driven programming. If you poll too fast, you are waste a lot of UPC time; if you poll too slow, you might not be able to capture every key press.

By searcing the net, I've found out, the user32.dll has the functionality in need in it. The function is called SetWindowsHookEx

That's the way to go.

(with the possibility to forward the Event back to windows or just
supress it). But with the documentation I've found from microsoft (http://msdn.microsoft.com/) I was not able to find a way to use this functionality in LabView.

That's what I mean "not easy".

George Zou
http://gtoolbox.yeah.net

_________________________________________________________________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.click-url.com/go/onm00200439ave/direct/01/






Reply via email to