Export (0) Print
Expand All

How to: Create a Pen

This example creates a Pen object.

System.Drawing.Pen myPen;
myPen = new System.Drawing.Pen(System.Drawing.Color.Tomato);

After you have finished using objects that consume system resources, such as Pen objects, you should call Dispose on them.

Show:
© 2014 Microsoft