title: What should I do to clear everything I have drawn before drawing new things on custom control?
body: <p>I have drawn Image on a custom control.</p>
  
  <p>But whenever I draw another Image in the custom control it overwrites or draws <strong>over</strong> it.Can I clear everything I have drawn, before drawing new things?</p>
  
  <p><strong>MY SOLUTIONS THAT DIDNT WORKED:</strong></p>
  
  <p><strong>S1></strong> I used <strong>this.Invalidate()</strong> which calls the paint event but it is not solving the problem because I already have some code in it which leads to same overdrawing problem.</p>
  
  <p><strong>S2></strong> Using <strong>Clear method of Graphics class</strong> solved the problem.
  I am using this code to clear everything in my custom control </p>
  
  <pre><code>//in my custom controls paint method
      Graphics g = this.CreateGraphics();
      g.Clear(this.ForeColor);
  </code></pre>
  
  <p>but it is flickering a lot!Thats why I used DoubleBuffered property and now its not showing anything!</p>