The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
How to: Draw an Outlined Shape
.NET Framework 3.5
This example draws outlined ellipses and rectangles on a form.
private void DrawEllipse() { System.Drawing.Pen myPen = new System.Drawing.Pen(System.Drawing.Color.Red); System.Drawing.Graphics formGraphics; formGraphics = this.CreateGraphics(); formGraphics.DrawEllipse(myPen, new Rectangle(0, 0, 200, 300)); myPen.Dispose(); formGraphics.Dispose(); } private void DrawRectangle() { System.Drawing.Pen myPen = new System.Drawing.Pen(System.Drawing.Color.Red); System.Drawing.Graphics formGraphics; formGraphics = this.CreateGraphics(); formGraphics.DrawRectangle(myPen, new Rectangle(0, 0, 200, 300)); myPen.Dispose(); formGraphics.Dispose(); }