mouse position relative to the whole screen?
-
i am using a mouse move message handler which is passing in
System.Windows.Forms.MouseEventArgs e
.. the problem is thate.X
ande.Y
are both relative to the current control which is calling the message handler.. how can i get the mouse position relative to the entire screen, not the control thats calling it? something like clienttorect or something? thanks! still a newb.. cut me some slack :P -dz -
i am using a mouse move message handler which is passing in
System.Windows.Forms.MouseEventArgs e
.. the problem is thate.X
ande.Y
are both relative to the current control which is calling the message handler.. how can i get the mouse position relative to the entire screen, not the control thats calling it? something like clienttorect or something? thanks! still a newb.. cut me some slack :P -dzSee
Control.PointToClient
andControl.PointToScreen
(there's also variants of those forRectange
s).
Reminiscent of my younger years... 10 LOAD "SCISSORS" 20 RUN