|
-
September 18th, 2009, 06:36 PM
#1
need code for c# to give mouse position when left mouse button...
need code for c# to give mouse position when left mouse button is clicked ...
Can some one help me in c# .. in my app, I want to have app return to me the SCREEN (nor Form) coordinates of mouse pointer when the left mouse button is clicked ....
I know this can be done, but I can't quite write the code to do it properly .... if anyone could help me, that would just be great.
Thank you.
-
September 18th, 2009, 09:14 PM
#2
Re: need code for c# to give mouse position when left mouse button...
-
September 18th, 2009, 09:37 PM
#3
Re: need code for c# to give mouse position when left mouse button...
But how do I 'watch for & detect' the 'left mouse click' ?
-
September 18th, 2009, 09:40 PM
#4
Re: need code for c# to give mouse position when left mouse button...
You want to detect a mouse click at any time? That would require a hook into the OS. If you want to be notified when your form is clicked simply handle OnMouseClick or OnMouseDown.
Here is an article on how to set a hook using C#:
http://support.microsoft.com/kb/318804
Last edited by BigEd781; September 18th, 2009 at 09:45 PM.
-
September 18th, 2009, 10:10 PM
#5
Re: need code for c# to give mouse position when left mouse button...
I will check it out ... thanks so much
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|