So, could I write an application which detects that another application has received a mouse click or keystroke? And if so, where would I start?
Announcement
Collapse
No announcement yet.
Can an app detect when another app gets a key or click?
Collapse
X
-
Came off my on-disk SDK, so I don't have a URL to the online version at msdn, but it will be there
Hooks
--------------------------------------------------------------------------------
A hook is a point in the system message-handling mechanism where an application can install a subroutine to monitor the message traffic in the system and process certain types of messages before they reach the target window procedure.Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
-
I believe you have to design the two applications with a direct data exchange (DDE) link. I did something like that in the dim and distant past and I believe it worked pretty well. A key stroke or mouse click will only be recognized by the application which has focus and it subsequently performs a DDE link to pass the event to the monitoring application.
Comment
-
Thanks both.
Hooks suits my requirement better. Here is a link to what I hope is a reliable and definitive MSDN document: http://msdn.microsoft.com/en-us/library/ms997537.aspx
(added) and this code by Semen looks very promising too! http://www.powerbasic.com/support/pb...highlight=hook
PS if you happen to follow that MSDN link, note the date written. I have some ground to make up!
Comment
-
believe you have to design the two applications with a direct data exchange (DDE) link
Except around here, when "not stated" the default is "of course they are not cooperating, I'm trying to make some $50.00 program work like the $100.00 program, and do it for less than $2,500.00 worth of development time"
That said, if these ARE cooperating applications... SendMessage sounds promising.
MCMMichael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
Comment