Hi Guys,


I am try to draw line and i want to make line rotate 360 degree and each degree changed regarding as timer intervals.


Code:
  double x1, y1, r;
        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            Graphics g = this.CreateGraphics();
            Pen p = new Pen(Color.Red);
            g.DrawEllipse(p, 0, 0, 398, 398);
            Pen p1 = new Pen(Color.Black);



            for (double theta = 20; r < 360; theta++)
            {
                theta = theta * (Math.PI / 360);
                x1 = r * (Math.Cos(theta));
                y1 = r * (Math.Sin(theta));
                g.DrawLine(p1, (float)x1, (float)y1, 200, 198);
            }
           
        }