Share via


PenTip Property

PenTip Property

Gets or sets a value that indicates which pen tip to use when drawing ink that is associated with this InkDrawingAttributes object.

Declaration

[C++]

[C++]

[propput] HRESULT put_PenTip (
    [in] InkPenTip PenTip
);
[propget] HRESULT get_PenTip (
    [out, retval] InkPenTip* PenTip
);

      

[Microsoft® Visual Basic® 6.0]

[Visual Basic]

Public Property Get PenTip() As InkPenTip
Public Property Let PenTip( _
    ByVal thePenTip As InkPenTip _
)

      

Property Value

InkPenTip A value that indicates which pen tip to use when drawing ink that is associated with this InkDrawingAttributes object. The default is InkPenTip.IPT_Ball

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER Parameter pointer was NULL or invalid.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

For a complete list of pen tips available to use, see the InkPenTip enumeration.

When this property is set to InkPenTip.IPT_Ball, the Height property is ignored.

To create a square pen tip, set the PenTip property to InkPenTip.IPT_Rectangle. Then set the Height property equal to the Width property.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example shows menu handlers that change the PenTip property of a DrawingAttributes property of the InkCollector object, theInkCollector.

[Visual Basic]

'...
Private Sub MenuInkPenTipBall_Click()
    MenuInkPenTipBall.Checked = True
    MenuInkPenTipRectangle.Checked = False
    theInkCollector.DefaultDrawingAttributes.PenTip = IPT_Ball
    Refresh
End Sub

Private Sub MenuInkPenTipRectangle_Click()
    MenuInkPenTipRectangle.Checked = True
    MenuInkPenTipBall.Checked = False
    theInkCollector.DefaultDrawingAttributes.PenTip = IPT_Rectangle
    Refresh
End Sub

Applies To