Поделиться через


InkCollectorSystemGestureEventHandler - делегат

Обновлен: Ноябрь 2007

Represents the method that handles the Gesture event of an InkCollector object.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Delegate Sub InkCollectorSystemGestureEventHandler ( _
    sender As Object, _
    e As InkCollectorSystemGestureEventArgs _
)
'Применение
Dim instance As New InkCollectorSystemGestureEventHandler(AddressOf HandlerMethod)
public delegate void InkCollectorSystemGestureEventHandler(
    Object sender,
    InkCollectorSystemGestureEventArgs e
)
public delegate void InkCollectorSystemGestureEventHandler(
    Object^ sender, 
    InkCollectorSystemGestureEventArgs^ e
)
/** @delegate */
public delegate void InkCollectorSystemGestureEventHandler(
    Object sender,
    InkCollectorSystemGestureEventArgs e
)
JScript не поддерживает делегаты.

Параметры

Заметки

When you create an InkCollectorSystemGestureEventHandler delegate, you identify the method that handles the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

System gestures give information about the Cursor object that is being used to create the gesture. They also provide shortcuts to combinations of mouse events and are effective ways to detect mouse events.

For example, instead of listening for a MouseUp and MouseDown pair of events with no other mouse events occurring in between, listen for the Tap or RightTap system gestures.

As another example, instead of listening for MouseDown and MouseMove events and getting numerous MouseMove messages, listen for the Drag or RightDrag system gestures, as long as you have no need for the (x, y) coordinates of every position of the mouse. This allows you to receive only one message instead of numerous MouseMove messages.

For a list of specific system gestures, see the SystemGesture enumeration type. For more information about system gestures, see Using Gestures and Command Input on the Tablet PC.

Примеры

The event handler in this example displays system gesture information on a status bar label, statusLabelSysGesture.

Private Sub Event_OnSystemGesture(ByVal sender As Object, ByVal e As InkCollectorSystemGestureEventArgs)
    Select Case e.Id
        Case SystemGesture.Tap
            Me.statusLabelSysGesture.Text = "Tap"
        Case SystemGesture.DoubleTap
            Me.statusLabelSysGesture.Text = "Double Tap"

    End Select
End Sub
private void Event_OnSystemGesture(object sender, InkCollectorSystemGestureEventArgs e)
{
    switch (e.Id)
    {
        case SystemGesture.Tap:
            this.statusLabelSysGesture.Text = "Tap";
            break;
        case SystemGesture.DoubleTap:
            this.statusLabelSysGesture.Text = "Double Tap";
            break;
    }

}

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

Microsoft.Ink - пространство имен

Cursor

SystemGesture