Partager via


DoubleClick Event

DoubleClick Event

Occurs when the InkCollector or InkOverlay object is double-clicked.

Declaration

[C++]

void DblClick([in, out] VARIANT_BOOL* Cancel);

[Microsoft® Visual Basic® 6.0]

Public Event DblClick( _
    Cancel As Boolean _
)

Parameters

Cancel

[in, out] Whether the event should be canceled for the parent control.

Remarks

This event method is defined in the _IInkCollectorEvents, _IInkOverlayEvents, and _IInkPictureEvents disintegrates with an ID of DISPID_IPEDblClick.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example demonstrates using event handlers to display CursorDown events, DoubleClick events, cursor CursorInRange events, or CursorOutOfRange events, TabletAdded events, and TabletRemoved events. This 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