I am using the CreateGraphics().DrawLine
functions to draw graphs in my program, and want to continuously update these points.
The only way I found to remove lines from the screen was to Refresh()
it. The thing is, this removes all of the lines (or segments of the line).
What I want to do is to clear one part (or segment) of a line, and replace it with another, without having to draw all of the other points again as well.
Example: Initial line is : (x and y coordinates)
1,1->2,2; 2,2->3,3; 3,3->4,4...
Now I just want to make the first part: 4,4->2,2;
and leave the rest.
Additional info: I am using windows forms, not WPF