views:

52

answers:

1

i have used two methods in windows application namely for event paint method name is Graph_Paint() and other event is for load Graphs_Load() and i am using scroll bars for that window when i drag the scroll bar it is repainting again and calling the method Graph_Paint() unable to see the correct picture of the graph.

alt text

the first URL image is the original one when i drag the scroll bar the image getting changed to second URL

alt text

A: 

You need to clear the screen before you paint the repositioned graph.

Dan Iveson
please tell how to clear the screen while moving the scroll bar please help.
I am assuming you are drawing your graph to a pictureBox control, in which case set the image to null and invalidate it.
Dan Iveson