WinForms Draw, Then Move Rectangle
问题 I have a rectangle I am trying to draw in a WinForms project using C#. I am drawing the rectangle on the form's Paint event: private void onPaintHandler(object sender, PaintEventArgs e) { using (Pen pen = new Pen(Color.Black, 1)) { Brush brush = new SolidBrush(Color.Gray); e.Graphics.FillRectangle(brush, 0, this.Height - 100, this.Width, 100); e.Graphics.DrawRectangle(pen, -1, this.Height - 100, this.Width, 100); brush.Dispose(); pen.Dispose(); } } I am interested in being able to move the