Share via


SetSingleTabletIntegratedMode Method

SetSingleTabletIntegratedMode Method

Allows the ink collector (InkCollector, InkOverlay, or InkPicture) to collect ink from only one tablet. Ink from other tablets is ignored by the ink collector.

Declaration

[C++]

        HRESULT SetSingleTabletIntegratedMode (
    [in] IInkTablet* tablet
);
      

[Microsoft® Visual Basic® 6.0]

        Public Sub SetSingleTabletIntegratedMode( _
    tablet As IInkTablet _
)
      

Parameters

tablet

[in] The tablet on which ink is collected, or drawn.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER A parameter contained an invalid pointer.
E_INK_COLLECTOR_ENABLED Cannot change modes while the collector is enabled.
E_INK_EXCEPTION An exception occurred while processing.
E_INK_INCOMPATIBLE_OBJECT IInkTablet* does not point to a compatible Ink object.

Remarks

To allow the ink collector to collect ink from all tablets, call the SetAllTabletsMode method.

Note: The ink collector object or control that collects ink must be disabled before calling this method. To disable the InkCollector object or the InkOverlay object, set the Enabled property to FALSE. To disable the InkPicture control, set the InkEnabled property to FALSE. After calling the SetSingleTabletIntegratedMode method, re-enable the object or control by setting the Enabled (or InkEnabled) property to TRUE.

When this method is called, the Cursors property of the ink collector is set to the empty collection.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example calls SetSingleTabletIntegratedMode on a new InkCollector object with the input set to use only the default tablet.

        Option Explicit
Dim theInkCollector As InkCollector

Private Sub Form_Load()
    Set theInkCollector = New InkCollector
    theInkCollector.hWnd = Me.hWnd
    Dim theTablets As New InkTablets
    theInkCollector.SetSingleTabletIntegratedMode theTablets.DefaultTablet
    theInkCollector.Enabled = True
End Sub

Applies To