Draw a fill rectangle dynamically on screen in C#
问题 I would like to draw a fill rectangle dynamically on my screen, with an opacity at 0.1. The problem is that when i move the mouse, the previous rectangles aren't clear. This is the drawing methods. private void OnMouseDown(object sender, MouseEventArgs e) { isMouseDown = true; x = e.X; y = e.Y; g = this.selectorForm.CreateGraphics(); } private void OnMouseMove(object sender, MouseEventArgs e) { if (!isMouseDown) return; this.selectorForm.Invalidate(); g.FillRectangle(brush, this.getRectangle