共用方式為


StrokesRemoved Event

StrokesRemoved Event

Occurs when one or more strokes are deleted from the InkStrokes collection.

Declaration

[C++]

void StrokesRemoved([in] VARIANT StrokeIds);

[Microsoft® Visual Basic® 6.0]

Public Event StrokesRemoved(StrokeIds)

Parameters

StrokeIds

[in] The integer array of identifiers for every IInkStrokeDisp object deleted when this event occurs.

For more information about the VARIANT structure, see Using the Automation Library.

Remarks

This event method is defined in the _IInkStrokesEvents interface. The _IInkStrokesEvents interface implements the IDispatch Leave Site interface with an identifier of DISPID_SEStrokesRemoved.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example demonstrates adding a StrokesRemoved event handler to a InkStrokes object. The event handler writes information about the removed strokes to a list box, (List1).

'...
Dim WithEvents theStrokes As InkStrokes

'...

Private Sub theStrokes_StrokesAdded(ByVal TheAddedStrokeIDs As Variant)
    Dim i As Long
    For Each i In TheAddedStrokeIDs
        List1.AddItem "Added stroke ID " & i
    Next
End Sub

Private Sub theStrokes_StrokesRemoved(ByVal TheRemovedStrokeIDs As Variant)
    Dim i As Long
    For Each i In TheRemovedStrokeIDs
        List1.AddItem "Removed stroke ID " & i
    Next
End Sub

Applies To