|
-
Jun 20th, 2007, 05:28 AM
#1
Thread Starter
Member
How to record a mouse position?
Howdy.
I have a button that is labled, Set Mouse.
I need that to pop up a new form(I know how to do that) That says Click where blah blah, then when they click it says, Now click blah blah, Then after they click the second time, and it records those 2 mouse positions to 2 diffrent things. Thanks!
-
Jun 20th, 2007, 05:41 AM
#2
Re: How to record a mouse position?
You can Use Me.MousePosition to get the mouse postion
-
Jun 20th, 2007, 06:13 AM
#3
Addicted Member
Last edited by Ashraf Alshahawy; Jun 20th, 2007 at 08:58 AM.
Some times when you make a step forward ...You can't get back. Be sure where you make your steps.
-
Jun 20th, 2007, 06:23 AM
#4
Thread Starter
Member
Re: How to record a mouse position?
Im sorry, I would like to know how to save their mouse position, so that when the timer is up it clicks where they last clicked =)
I guess both
-
Jun 20th, 2007, 06:36 AM
#5
Addicted Member
Last edited by Ashraf Alshahawy; Jun 20th, 2007 at 08:58 AM.
Some times when you make a step forward ...You can't get back. Be sure where you make your steps.
-
Jun 20th, 2007, 08:39 AM
#6
Re: How to record a mouse position?
Piece of cake. I'm not even gonna load up VS for this. Create a List(Of Point), since the Point object has an X and Y, and every time the mouse is clicked, trap the point and add it to the list.
I lied, I am going to load up VS... bloody event args...
vb Code:
Dim myclicks As New List(Of Point)
Private Sub Form1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick
myclicks.Add(New Point(e.X, e.Y))
End Sub
Whenever you need them, every click will have been logged in the myClicks list, which you can loop through very simply:
vb Code:
For Each p As Point In myclicks
'do stuff here
Next
Hope this helps!
-
Jun 20th, 2007, 08:44 AM
#7
Addicted Member
Last edited by Ashraf Alshahawy; Jun 20th, 2007 at 08:57 AM.
Some times when you make a step forward ...You can't get back. Be sure where you make your steps.
-
Jun 20th, 2007, 08:48 AM
#8
Re: How to record a mouse position?
Um.. from his request, he doesn't need to put the mouse anywhere, just record where it's been clicked...
-
Jun 20th, 2007, 08:52 AM
#9
Addicted Member
Last edited by Ashraf Alshahawy; Jun 20th, 2007 at 08:59 AM.
Reason: Rude way while talking
Some times when you make a step forward ...You can't get back. Be sure where you make your steps.
-
Jun 20th, 2007, 08:56 AM
#10
Re: How to record a mouse position?
My apologies, I missed that post. Regardless, I'm sure .NET has a better way of doing it.
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
|