Question DrawLines using Points.Toarray

sth_syed

Member
Joined
Aug 26, 2010
Messages
6
Programming Experience
Beginner
Hello All,

I get the mouse move points (locations where I move the mouse get the x,y points).

I able to store the locations in array using List(Of Point) {Points.Add(e.Location) }

Now I want to DrawLines of mouse move by clicking DrawButton.

e.Graphics.DrawLines(blackPen, Points.ToArray) but i get the error (Argument Exception was unhandled) Parameter was invalid.

Please help me to draw the lines.



Thanks in advance.
 
Maybe show us the actual relevant code, i.e. where Points is declared, populated and used. Can you also show us the stack trace for the exception? DrawLines itself doesn't throw an ArgumentException, so it must be deeper. DrawLines only throws a ArgumentNullException. Are you that `blackPen` is not Nothing?
 
Back
Top