Share via


CollectingInk Property

CollectingInk Property

Gets a value that specifies whether ink is currently being drawn on an ink collector (InkCollector, InkOverlay, or InkPicture).

Declaration

[C++]

[propget] HRESULT get_CollectingInk ([out, retval] VARIANT_BOOL*
    CollectingInk);

[Microsoft® Visual Basic® 6.0]

Public Property Get CollectingInk() As Boolean

Property Value

VARIANT_BOOL Whether ink is currently being drawn on an ink collector.

This property is read-only.

TRUE If ink is being drawn.
FALSE If ink is not being drawn.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The CollectingInk parameter is an invalid pointer.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

You can use the CollectingInk property to see if ink is being drawn on an ink collector rather than monitoring the Stroke event.

Note: Because ink collection is happening on a different thread than your application code, it is possible that the CollectingInk property can change soon after you have checked it. Thus, your code may be operating under the assumption that the ink collector is not collecting ink, when in fact it is. If this occurs, an error is thrown. To be safe, put such code in a try-catch block.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example returns the value that indicates whether ink is being drawn.

Dim isCollecting As Boolean
isCollecting = theInkCollector.CollectingInk

Applies To