Bewerken

Delen via


Shapes.AddConnector(MsoConnectorType, Single, Single, Single, Single) Method

Definition

Creates a connector. Returns a Shape object that represents the new connector.

public:
 Microsoft::Office::Interop::Excel::Shape ^ AddConnector(Microsoft::Office::Core::MsoConnectorType Type, float BeginX, float BeginY, float EndX, float EndY);
public Microsoft.Office.Interop.Excel.Shape AddConnector (Microsoft.Office.Core.MsoConnectorType Type, float BeginX, float BeginY, float EndX, float EndY);
Public Function AddConnector (Type As MsoConnectorType, BeginX As Single, BeginY As Single, EndX As Single, EndY As Single) As Shape

Parameters

Type
MsoConnectorType

Required MsoConnectorType. The connector type to add. Can be one of these MsoConnectorType constants:msoConnectorElbowmsoConnectorTypeMixedmsoConnectorCurvemsoConnectorStraight

BeginX
Single

Required Single. The horizontal position (in points) of the connector's starting point relative to the upper-left corner of the document.

BeginY
Single

Required Single. The vertical position (in points) of the connector's starting point relative to the upper-left corner of the document.

EndX
Single

Required Single. The horizontal position (in points) of the connector's end point relative to the upper-left corner of the document.

EndY
Single

Required Single. The veritcal position (in points) of the connector's end point relative to the upper-left corner of the document.

Returns

Remarks

When a connector is added, it's not connected to anything. Use the BeginConnect(Shape, Int32) and EndConnect(Shape, Int32) methods to attach the beginning and end of a connector to other shapes in the document.

When you attach a connector to a shape, the size and position of the connector are automatically adjusted, if necessary. Therefore, if you’re going to attach a connector to other shapes, the position and dimensions you specify when adding the connector are irrelevant.

Applies to