title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
How to: Create a Pen |
03/30/2017 |
|
|
7fbea8b7-7ac1-4413-9c17-733a850381e3 |
Learn the process for how to create a Pen object, including details for robust programming and supporting links. |
This example creates a xref:System.Drawing.Pen object.
[!code-cppSystem.Drawing.ConceptualHowTos#3] [!code-csharpSystem.Drawing.ConceptualHowTos#3] [!code-vbSystem.Drawing.ConceptualHowTos#3]
After you have finished using objects that consume system resources, such as xref:System.Drawing.Pen objects, you should call xref:System.Drawing.Pen.Dispose%2A on them.
- xref:System.Drawing.Pen
- Getting Started with Graphics Programming
- Pens, Lines, and Rectangles in GDI+