Using a Pen to Draw Lines and Shapes

Use GDI+ Pen objects to draw line segments, curves, and the outlines of shapes. In this section, line refers to any of these, unless specified to mean only a line segment. Set the properties of a pen to control the color, width, alignment, and style of lines drawn with that pen.

After creating a pen, use the methods of the Graphics object to draw lines with the pen.

The following topics explain how to create and use GDI+ pens: