this is jagadeesh, iam visual studio 10 IDE and c# language for one grafical application .
for that application i used tabpages, one of that tab pages i have to draw graph in that page.it works also but while i selected another page the control goes to that page, after return to graph page the graph is vanished.but i didn't want that .any body can help abiut this problem.
You need to draw all of the lines every time in your Paint handler.
I just wrote this code, it may help you make some progress.
public partial class Form1 : Form
List<Point> _points = new List<Point>();
Random _random = new Random();
// at least two points are required...
_points.Add(new Point(0, 0));
_points.Add(new Point(this.Width, this.Height));
private void Form1_Paint(object sender, PaintEventArgs e)
Graphics g = e.Graphics;
private void timer1_Tick(object sender, EventArgs e)
_points.Add(new Point(_random.Next(this.Width), _random.Next(this.Height)));
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......