次の方法で共有


Stroke.GetPacketValuesByProperty Method

Stroke.GetPacketValuesByProperty Method

Returns the data for a known packet property from one or more packets in the Stroke object.

Definition

Visual Basic .NET Public Function GetPacketValuesByProperty( _
ByVal id As Guid, _
ByVal index As Integer _
) As Integer()
C# public int[] GetPacketValuesByProperty(
Guid id,
int index
);
Managed C++ public: int* GetPacketValuesByProperty(
Guid *id,
int *index
) __gc[];

Parameters

id System.Guid. The Guid Leave Site identifier from the PacketProperty object that is used to select which packet data is retrieved.
index System.Int32. The starting point of the zero-based index to a packet within the Stroke object.

Return Value

System.Int32[]. Returns an array of signed 32-bit integers that specifies the value of the requested PacketProperty object for each point requested from the Stroke object.

Remarks

A specific packet property may not be available on a particular Stroke object. A Tablet PC may have more than one tablet for user input. The Tablets collection contains a list of all the tablets attached to the Tablet PC. Use the IsPacketPropertySupported method to determine if a particular packet property is supported by a specific Tablet object or by all the available tablets. Also, use the InkCollector.DesiredPacketDescription, InkOverlay.DesiredPacketDescription, or InkPicture.DesiredPacketDescription properties to control which packet properties are collected on new strokes.

Examples

[C#]

This C# example gets the ButtonPressure packet information for the first point in the Stroke object, theStroke, starting at the second point.

int[] theButtonPressureData =
    theStroke.GetPacketValuesByProperty(PacketProperty.ButtonPressure, 1);
                

[VB.NET]

This Microsoft® Visual Basic® .NET example gets the ButtonPressure packet information for the first point in the Stroke object, theStroke, starting at the second point.

Dim theButtonPressureData() As Integer = _
    theStroke.GetPacketValuesByProperty(PacketProperty.ButtonPressure, 1)
                

See Also