gdi line cursor
-
I'm trying to create a dragging data cursor that can be dragged horizontally on an xy plotted graph. Currently, every time the cursor gets dragged, i have to redraw the entire plotted graph. Is there any way to simply redraw the cursor in its new position without redrawing the entire graph. The graph is currently created as a user control and the cursor is simply a line drawn in the control. thanks
-
I'm trying to create a dragging data cursor that can be dragged horizontally on an xy plotted graph. Currently, every time the cursor gets dragged, i have to redraw the entire plotted graph. Is there any way to simply redraw the cursor in its new position without redrawing the entire graph. The graph is currently created as a user control and the cursor is simply a line drawn in the control. thanks
If you are responsible for drawing the graph then you need to take care to only draw the area specified in
PaintEventArgs.ClipRectangle
, which is the invalidated area of your control. The whole graph does not need to be repainted unless, of course, the clipping area covers the entire control. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]