How to delete rectangle drew with GDI
Posted on 2004-08-17
I have simple question regarding to drawing with GDI.
How can I delete things which I drew with GDI, I mean for instance, a rectangle.
I’m using following code to draw rectangle:
Graphics gfx = this.tabControlPanel3.CreateGraphics();
Rectangle rc = new Rectangle(10,20,100,200);
gfx.SmoothingMode = SmoothingMode.AntiAlias;
Pen pen = new Pen(Brushes.Red,3);
I want to delete this rectangle from my Form after pressing a button.
Thanks for your help.