Get All Mouse Events

  • Thread starter Thread starter Mike Bulava
  • Start date Start date
M

Mike Bulava

I know this has to be something stupid I'm forgetting. Any time a mouse
button is clicked (any mouse button) I want get all the information about
where the Pointer is, what button was clicked, etc even if it not over a
form my app created. How can I do this. Like I said I know this is simple
I just can't remember it.
 
I know this has to be something stupid I'm forgetting. Any time a mouse
button is clicked (any mouse button) I want get all the information about
(...)

You need to set up a global Hook for the mouse. It is a little bit tricky in
..NET, since .NET documentation says it does not support hooks, but...
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF8&scoring=d&q=visualcore.com+hook

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
 
Check out the MouseEventArgs, they contain Button, X, Y , Clicks, Empty and
Delta. Trapping MouseDown will get this for you.. HTH,

Bill
 
* "Mike Bulava said:
I know this has to be something stupid I'm forgetting. Any time a mouse
button is clicked (any mouse button) I want get all the information about
where the Pointer is, what button was clicked, etc even if it not over a
form my app created. How can I do this. Like I said I know this is simple

You will have to set up a global hook. Sample for keyboard hook (works
similar with a mouse hook):

<http://www.developer.com/net/net/article.php/11087_2193301_1>
 
Mike Bulava said:
I know this has to be something stupid I'm forgetting. Any time a mouse
button is clicked (any mouse button) I want get all the information about
where the Pointer is, what button was clicked, etc even if it not over a
form my app created. How can I do this. Like I said I know this is simple
I just can't remember it.


Thanks Guys I got it now. I just need to change a few things in the class
so that I can either raiseevents or Check properties of the mouse
 
Back
Top