The mouse outside of a form

NJDubois

Well-known member
Joined
May 15, 2008
Messages
84
Programming Experience
Beginner
I'm 100% sure that the answer I am looking for exists somewhere. Probable in this forum. Searching for mouse related subjects, even with +vb.net in google returns vb6 code, and my time is up and have to get away from learning vb.net for a few days. so I'll post my question here and hope that someone has mercy and patience with a vb.net noob.

I am very strong with vb6 and have used the API code to get what I need, but I can't get it to work in vb.net (08)

How do I read the mouse cursor position outside of a form? I read on one forum that it wasn't possible unless you wanted to re-write windows or use directX. This just can't be! I had thought that it would be under my.computer.mouse. but no such luck. I just can't believe that there isn't an easy way to get the current position of the mouse, in or outside of a form.

Again, I am sorry for another post about something that was probably already answered but time is money and I need to get me a job!
Thanks!
Nick
 
"Mouse" is the physical device you use to control the "Cursor" pointer in Windows. So the answer is: Cursor.Position - property returns a Point.
 
Back
Top