Version

Add(PredefinedShapeType,Sheet,Rectangle) Method

Adds a predefined shape to the collection with the specified bounds.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal shapeType As PredefinedShapeType, _
   ByVal sheet As Sheet, _
   ByVal boundsInTwips As System.Drawing.Rectangle _
) As WorksheetShape
public WorksheetShape Add( 
   PredefinedShapeType shapeType,
   Sheet sheet,
   System.Drawing.Rectangle boundsInTwips
)

Parameters

shapeType
The type of shape to add to the collection.
sheet
The Sheet to which the boundsInTwips relate.
boundsInTwips
The bounds of the shape on the sheet in twips (1/20th of a point).

Return Value

A WorksheetShape-derived instance representing the predefined shape.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionsheet is null.
System.ComponentModel.InvalidEnumArgumentExceptionshapeType is not defined in the PredefinedShapeType enumeration.
Requirements

Target Platforms: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

View on GitHub