다음을 통해 공유


InkCollectorNewInAirPacketsEventArgs.Cursor 속성

업데이트: 2007년 11월

NewInAirPackets 이벤트를 발생시킨 Cursor 개체를 가져옵니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
Public ReadOnly Property Cursor As Cursor
‘사용 방법
Dim instance As InkCollectorNewInAirPacketsEventArgs
Dim value As Cursor

value = instance.Cursor
public Cursor Cursor { get; }
public:
property Cursor^ Cursor {
    Cursor^ get ();
}
/** @property */
public Cursor get_Cursor()
public function get Cursor () : Cursor

속성 값

형식: Microsoft.Ink.Cursor
NewInAirPackets 이벤트를 발생시킨 개체입니다.

설명

Microsoft.Ink.Cursor 클래스와 System.Windows.Fo 클래스를 서로 구별해야 합니다. Microsoft.Ink.Cursor는 태블릿 포인팅 및 선택 장치(일반적으로 펜)에 대한 일반적인 정보를 나타내는 반면 System.Windows.Forms.Cursor는 마우스 포인터를 그리는 데 사용되는 이미지를 나타냅니다.

예제

이 예제에서 InkCollectorNewInAirPacketsEventHandler 인스턴스는 InkCollectorNewInAirPacketsEventArgs 개체를 통해 전달된 마지막 패킷의 XY 값을 가져옵니다. 패킷 데이터의 처음 두 위치는 항상 XY 값이 차지합니다.

Private Sub mInkObject_NewInAirPackets2(ByVal sender As Object, ByVal e As InkCollectorNewInAirPacketsEventArgs)
    Dim DescriptorsPerPacket As Integer = 0
    ' determine how many descriptors there are per packet
    ' you could also obtain this value using:
    '   e.PacketData.Length / e.PacketCount
    ' but if you need to know which particular properties
    ' are supported (beyond X and Y which are always placed first)
    ' you will need to query e.Cursor.Tablet.IsPacketPropertySupported()
    For Each G As Guid In mInkObject.DesiredPacketDescription
        If (e.Cursor.Tablet.IsPacketPropertySupported(G)) Then
            DescriptorsPerPacket += 1
        End If
    Next

    Dim LastX As Integer = e.PacketData(DescriptorsPerPacket * (e.PacketCount - 1))
    Dim LastY As Integer = e.PacketData((DescriptorsPerPacket * (e.PacketCount - 1)) + 1)
End Sub
private void mInkObject_NewInAirPackets2(object sender, InkCollectorNewInAirPacketsEventArgs e)
{
    int DescriptorsPerPacket = 0;
    // determine how many descriptors there are per packet
    // you could also obtain this value using:
    //   e.PacketData.Length / e.PacketCount
    // but if you need to know which particular properties
    // are supported (beyond X and Y which are always placed first)
    // you will need to query e.Cursor.Tablet.IsPacketPropertySupported()

    foreach (Guid G in mInkObject.DesiredPacketDescription)
    {
        if (e.Cursor.Tablet.IsPacketPropertySupported(G))
        {
            DescriptorsPerPacket++;
        }
    }

    int LastX = e.PacketData[DescriptorsPerPacket * (e.PacketCount - 1)];
    int LastY = e.PacketData[(DescriptorsPerPacket * (e.PacketCount - 1)) + 1];

}

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

InkCollectorNewInAirPacketsEventArgs 클래스

InkCollectorNewInAirPacketsEventArgs 멤버

Microsoft.Ink 네임스페이스

InkCollector.NewInAirPackets