473,395 Members | 1,675 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Get All Mouse Events

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.
Nov 20 '05 #1
4 1453
Check out the MouseEventArgs, they contain Button, X, Y , Clicks, Empty and
Delta. Trapping MouseDown will get this for you.. HTH,

Bill
"Mike Bulava" <mb*****@comcast.net> wrote in message
news:O$**************@TK2MSFTNGP09.phx.gbl...
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.

Nov 20 '05 #2
news:O$**************@TK2MSFTNGP09.phx.gbl...
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=e...lcore.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
Nov 20 '05 #3
* "Mike Bulava" <mb*****@comcast.net> scripsit:
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>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

"Mike Bulava" <mb*****@comcast.net> wrote in message
news:O$**************@TK2MSFTNGP09.phx.gbl...
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
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Champaign | last post by:
Hi all, I'm working on an educational applet for a child with special needs. He's got a bit of a trick to make my life more difficult... To interact with the applet he needs to click on...
0
by: Stephen Williams | last post by:
I am migrating a VB 6 PictureBox control to VB.NET. In VB 6, this control modified its border style during the mouse down and up events to provide user feedback that it was selected. Once...
1
by: Jean-Gael GRICOURT | last post by:
I am trying to capture mouse events when entering and leaving a DIV layer. This test code works fine with IE 6.0 and Opera 7.21 but fails with Mozilla/Netscape. The strange thing is that the mouse...
3
by: red | last post by:
mouse events when the mouse is on a "child control" hi everyone; my problem: I have a userControl in this usercontrol, I have a child control (a button) when the mouse moves over the...
5
by: Bill Henning | last post by:
Does anyone know a good method of preventing keyboard and mouse events from interrupting processing? My situation is: 1) I need to track and handle all key and mouse events 2) I need to perform...
3
by: Rick Strahl [MVP] | last post by:
I'm working on an app that's using the WebBrowser control. I got the control working fine, hooking to the document object. But I've run into a major issue with hooking the Document events....
3
by: Charles Law | last post by:
In a user control, is it possible to replace the default mouse events with my own? In particular, I want the consumer of my control to get MouseMove events when the mouse is over my control, so...
2
by: bretth | last post by:
In a VB.Net Windows Forms application, I have a user control that handles mouse events. Another section of code programmatically adds a label to the control. I would like label to ignore all...
5
by: Adeel | last post by:
Hi group! I'm trying to learn C# on my own... I'd appreciate it very much if someone can help me out here. I have a basic form without any controls on it... I want to catch mouse clicks (both...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.