Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.32 KB

how-to-create-a-pen.md

File metadata and controls

33 lines (26 loc) · 1.32 KB
title ms.date dev_langs helpviewer_keywords ms.assetid description
How to: Create a Pen
03/30/2017
csharp
vb
cpp
graphics [Windows Forms], creating pens
pens [Windows Forms], creating
Pen object
7fbea8b7-7ac1-4413-9c17-733a850381e3
Learn the process for how to create a Pen object, including details for robust programming and supporting links.

How to: Create a Pen

This example creates a xref:System.Drawing.Pen object.

Example

[!code-cppSystem.Drawing.ConceptualHowTos#3] [!code-csharpSystem.Drawing.ConceptualHowTos#3] [!code-vbSystem.Drawing.ConceptualHowTos#3]

Robust Programming

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.

See also