0
Answer

Help with concentric circles

Hello, so i need help. I'm a total newbie and i need help to delete every previous circle when the new one pops up.  
The program down below creates concentric circles only, and i don't know how to "recreate" it(soz, english is not my main language)
Thanks in advance. 
 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int x, y, R, d, br, pR;
Random r = new Random();
Pen olovka = new Pen(Color.Red, 5);
private void timer1_Tick(object sender, EventArgs e)
{
br++;
Graphics g = CreateGraphics();
g.DrawEllipse(olovka, x - R, y - R, 2 * R, 2 * R);
R += pR;
pR += 5;
timer1.Interval += 200;
if (br % 2 == 0) d--;
olovka.Width = d;
if (d == 0)
timer1.Enabled = false;
}
private void Form1_MouseDown(object sender, MouseEventArgs e)
{
x=e.X;
y=e.Y;
R=5;
d=5;
pR=1;
olovka.Width=d;
timer1.Enabled=true;
timer1.Interval=1;
Refresh();
br=0;
}
}
}