Enabled Property

Enabled Property

Returns or sets a value that specifies whether the InkCollector or InkOverlay object collects pen input (in-air packets, cursor in range events, and so on).

Declaration

[C++]

[propput] HRESULT put_Enabled ([in] VARIANT_BOOL Enabled);
[propget] HRESULT get_Enabled ([out, retval] VARIANT_BOOL* Enabled);

[Microsoft® Visual Basic® 6.0]

Public Property Get Enabled() As Boolean
Public Property Let Enabled(ByVal isEnabled As Boolean)

Property Value

VARIANT_BOOL Returns or sets the Boolean value that specifies whether the object collects pen input.

This property is read/write.

TRUE If TRUE, the object collects pen input.
FALSE Default. If FALSE, the object does not report pen input and therefore no pen-related events are fired.

Return Value

HRESULT value Description
S_OK Success.
E_INK_COLLECTOR_BUSY The object is currently collecting ink. The object could not be disabled.
E_POINTER The Enabled parameter is an invalid pointer.
E_INK_OVERLAPPING_INPUT_RECT The window input rectangle overlaps with an enabled object's window input rectangle.
E_INVALIDARG The specified mode is invalid.
E_INK_EXCEPTION An exception occurred.

Remarks

If an enabled object's window input rectangle (set in the constructor or with the SetWindowInputRectangle method) of an enabled object overlaps the window input rectangle of another enabled object, the E_INK_OVERLAPPING_INPUT_RECT error is returned.

Note: Overlap can occur without an error as long as only one of the input rectangles is enabled at any known time.

While an object is not enabled, you receive no events.

When a container control has its Enabled property set to FALSE, all of its contained controls are disabled as well.

You cannot set the Enabled property to FALSE while the object is collecting ink (CollectingInk property is TRUE).

We recommend that objects have Enabled set to FALSE when an application is shut down.

This property must be set to FALSE before setting or calling specific properties and methods of the object. If you try to change the specified properties or methods, an error occurs. The following properties and methods cannot be set or called unless the Enabled property is first set to FALSE:

Properties

Methods

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example creates an InkCollector object and enables it.

'...
Dim theInkCollector As New InkCollector
theInkCollector.hWnd = Me.hWnd
theInkCollector.Enabled = True
'...

Applies To