Board index » cppbuilder » Re: How Can I Detect Mouse Click Or Key Press When The Application Not......

Re: How Can I Detect Mouse Click Or Key Press When The Application Not......


2005-04-05 02:57:52 PM
cppbuilder61
Hi Ramy,
You'll need to use a system-wide hook (namely, the SetWindowHookEx()
function). Have a look at the following page for a code example...
www.swissdelphicenter.ch/torry/printcode.php
Good luck,
Ramy wrote:
Quote
How can i detect Mouse button Click or a keyboard key press when
the application not in focus?
 
 

Re:Re: How Can I Detect Mouse Click Or Key Press When The Application Not......

Hi,
How can i detect Mouse button Click or a keyboard key press when
the application not in focus? let's say the my application is
running in the background, but at the same time i'm using another
program (for example Word or Excel) and i want my application to
detect each mouse click or key press at this time.
Any easy way to do that?
Thanks,
Ramy