Export (0) Print
Expand All

Pen Class

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.

System.Object
   System.MarshalByRefObject
      System.Drawing.Pen

[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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

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.

Requirements

Namespace: System.Drawing

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)

See Also

Pen Members | System.Drawing Namespace

Show:
© 2014 Microsoft