title: Delete rectangle using .NET?
body: <p>Can I delete the old rectangle which I have drawn and draw a new rectangle?</p>
  
  <pre><code>private void panel1_MouseClick(object sender, MouseEventArgs e)
  {
          Graphics g = this.panel1.CreateGraphics();
          Pen pen = new Pen(Color.Black, 2);
  
          g.DrawRectangle(pen, 100,100, 100, 200);
          g.dispose();
  }
  </code></pre>