共用方式為


Ink Property

Ink Property

Gets or sets the InkDisp object that is associated with an InkCollector object or an InkOverlay object.

Declaration

[C++]

[propputref] HRESULT putref_Ink ([in] InkDisp* Ink);
[propget] HRESULT get_Ink ([out, retval] InkDisp** Ink);

[Microsoft® Visual Basic® 6.0]

Public Property Get Ink() As InkDisp
Public Property Set Ink(ByVal theInk As InkDisp)

Property Value

InkDisp Gets or sets the InkDisp object that is associated with an InkCollector object or an InkOverlay object.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The Ink parameter must be a valid pointer to an Ink pointer.
E_INK_COLLECTOR_ENABLED Cannot change Ink object while collecting.
E_INK_EXCEPTION An exception occurred inside the method.
E_INVALIDARG Invalid hWnd value.

Remarks

Note: The InkCollector object or the InkOverlay object must be disabled before setting this property. To disable the InkCollector object or the InkOverlay object, set the Enabled property to FALSE. You can then set the Ink property, and re-enable the object by setting the Enabled property to TRUE.

An InkCollector creates an InkDisp object by default. If two or more InkDisp objects exist on a known application window, they can be switched out to enable collection into any of them (such as after deserializing one of the InkDisp objects).

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example returns an InkCollector associated InkDisp object.

Dim theInk As InkDisp
Set theInk = theInkCollector.Ink

Applies To