How to delete a drawn circle in c# windows form?
问题 I have drawn a circle in windows form Pen pen = new Pen(Color.Black, 3); Graphics gr = this.CreateGraphics(); gr.DrawEllipse(pen, 5,5,20,20); How to delete it... 回答1: You can invalidate the draw region you want to refresh for example: this.Invalidate(); on the form... 回答2: You have to clear your Graphic: Graphics.Clear(); But all drawn figures will be cleared. Simply, you will then need to redraw all figures except that circle. Also, you can use the Invalidate method: Control.Invalidate() It