I have drawn Image on a custom control.
But whenever I draw another Image in the custom control it overwrites or draws over it.Can I clear everything I have drawn, before drawing new things?
MY SOLUTIONS THAT DIDNT WORKED:
S1> I used this.Invalidate() 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.
S2> Using Clear method of Graphics class solved the problem. I am using this code to clear everything in my custom control
//in my custom controls paint method
Graphics g = this.CreateGraphics();
g.Clear(this.ForeColor);
but it is flickering a lot!Thats why I used DoubleBuffered property and now its not showing anything!