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!




Reply With Quote