Click here to Skip to main content
15,306,245 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i am trying to implement a program in which i want to get an array of points that the user enters by clicking the mouse several times in different places over a picturebox ,the simple picturebox_mousdown event can only save for me one point ,
any help ?
Posted

1 solution

Create a List<Point> at class level, and at each click event use the List.Add method to add a new point into the list.

At some point you will want to either clear the list or copy the reference and assign a new list to it, but that's basic stuff!
   
v2
Comments
#realJSOP 3-Jan-11 6:35am
   
My edit involved putting <code> tags around a couple of things. :)
OriginalGriff 3-Jan-11 6:40am
   
Thanks John! Good idea.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900