Information
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.

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.

In This Section

How to: Use a Pen to Draw Lines

Explains how to draw lines.

How to: Use a Pen to Draw Rectangles

Describes how to draw rectangles.

How to: Set Pen Width and Alignment

Explains how to change the width and alignment of a Pen object.

How to: Draw a Line with Line Caps

Describes how to add end caps when drawing a line.

How to: Join Lines

Shows how to join two lines.

How to: Draw a Custom Dashed Line

Describes how to draw a dashed line.

How to: Draw a Line Filled with a Texture

Explains how to draw a texture-filled line.

Reference

Pen

Describes this class and has links to all its members.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft