Defines an object used to draw lines and curves. This class cannot be inherited.
For a list of all members of this type, see Pen Members.
[Visual Basic] NotInheritable Public Class Pen Inherits MarshalByRefObject Implements ICloneable, IDisposable [C#] public sealed class Pen : MarshalByRefObject, ICloneable, IDisposable [C++] public __gc __sealed class Pen : public MarshalByRefObject, ICloneable, IDisposable [JScript] public class Pen extends MarshalByRefObject implements ICloneable, IDisposable
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
A Pen object draws a line of specified width and style. Use the DashStyle property to draw several varieties of dashed lines. The line drawn by a Pen object can be filled in a variety of fill styles, including solid colors and textures. The fill style depends on brush or texture that is used as the fill object.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: System.Drawing (in System.Drawing.dll)