TabletRemoved Event

TabletRemoved Event

Occurs when a IInkTablet is removed from the system.



void TabletRemoved([in] long TabletId);

[Microsoft® Visual Basic® 6.0]

Public Event TabletRemoved(TabletId As Long)



[in] The long value that was used as the ID for the IInkTablet object that was removed.


This event method is defined in the _IInkCollectorEvents, _IInkOverlayEvents, and _IInkPictureEvents dispatch-only interfaces (dispinterfaces) with an ID of DISPID_ICETabletRemoved.


[Visual Basic 6.0]

This Visual Basic 6.0 example demonstrates using event handlers to display CursorDown events, DoubleClick events, CursorInRange events, CursorOutOfRange events, TabletAdded events, and TabletRemoved events. This simple application has a text edit control, Text1, where messages appear when events are received.

Option Explicit
Dim WithEvents theInkCollector As InkCollector

Private Sub Form_Load()
    Set theInkCollector = New InkCollector
    theInkCollector.hWnd = Me.hWnd
    theInkCollector.Enabled = True

    theInkCollector.SetEventInterest ICEI_CursorDown, True
    theInkCollector.SetEventInterest ICEI_DblClick, True
    theInkCollector.SetEventInterest ICEI_TabletAdded, True
    theInkCollector.SetEventInterest ICEI_TabletRemoved, True
End Sub

Private Sub theInkCollector_CursorDown( _
ByVal Cursor As MSINKAUTLib.IInkCursor, _
ByVal Stroke As MSINKAUTLib.IInkStrokeDisp)
    Text1.Text = "Cursor " & Cursor.Name & " down"
End Sub

Private Sub theInkCollector_CursorInRange( _
ByVal Cursor As MSINKAUTLib.IInkCursor, _
ByVal NewCursor As Boolean, _
ByVal ButtonsState As Variant)
    Text1.Text = "Cursor " & Cursor.Name & " in range"
End Sub

Private Sub theInkCollector_CursorOutOfRange( _
ByVal Cursor As MSINKAUTLib.IInkCursor)
    Text1.Text = "Cursor " & Cursor.Name & " out of range"
End Sub

Private Sub theInkCollector_DblClick(Cancel As Boolean)
    Text1.Text = "DblClick"
End Sub

Private Sub theInkCollector_TabletAdded( _
ByVal Tablet As MSINKAUTLib.IInkTablet)
    Text1.Text = _
    "Added tablet " & Tablet.Name & "   Id: " & Tablet.PlugAndPlayId
End Sub

Private Sub theInkCollector_TabletRemoved(ByVal TabletId As Long)
    Text1.Text = "Removed tablet " & TabletId
End Sub

Applies To