This article describes the method of using GDI to draw rectangles in C#. Share it for your reference. The specific implementation method is as follows:
Pen p = new Pen(,2); Graphics g = CreateGraphics(); (p,200,200,100,100);
I hope this article will be helpful to everyone's C# programming.