public void DrawRectangleRectangle(PaintEventArgs e) { // Create pen. Pen blackPen = new Pen(Color.Black, 3); // Create rectangle. Rectangle rect = new Rectangle(0, 0, 200, 200); // Draw rectangle to screen. e.Graphics.DrawRectangle(blackPen, rect); }
Windows Form
private void Form1_Paint(object sender, PaintEventArgs e) { DrawRectangleRectangle(e); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)