Hi,
How can i interecept a mouse click outside of the application?
Printable View
Hi,
How can i interecept a mouse click outside of the application?
Control.Capture property will do it... Read about Capture property in MSDN...
martin
I've looked at it and it seems like it allows only to capture events with in the window of the application.
Can you provide some links?
Thanks.
actually when u click outside of the app then focus is lost isn't it...
Paresh
you could try Cursor.Position
I think I know what you need, but it is not going to be simple. You need something like a spy - a program that "hooks" Windows messages, grabs them before they reach their target application.
A possible answer is the article
ms-help://MS.VSCC/MS.MSDNQTR.2002OCT.1033/dnwui/html/msdn_hooks32.htm
(I put here the address from my Microsoft Visual C#.net help - it should also work for you). If I am not wrong, this article provides the source code for a dll that you may use for creating your own hook.
I used this code to make my own hook in C# - and it was not pleasant, because I had to use unsafe code. But maybe you can find a better way.
Hope this helps.
Petru
the link doesn't come up.
Paresh
Sorry - I did not know how to post the address of the article.
So this is its name:
------------
Win32 Hooks
Kyle Marsh
Microsoft Developer Network Technology Group
-------------
It can be found in MSDN in
--------
Windows User Interface Technical Articles
--------
Maybe you can search it using some keywords.
In fact, I just copied the link that I did in the previous article, opened
a dynamic help / search session, asked for whatever ("hook", for instance),
clicked on a link in the "Search result" window, and in the "Help" toolbar that appeared, I pasted the link; and lo! there it was.
Petru
thank you .
will look in to it.