Tablets.IsPacketPropertySupported Method
Returns a value that indicates whether a PacketProperty field, identified with a globally unique identifier (GUID), is supported by all Tablet objects in this Tablets collection.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)
Syntax
'Declaration
Public Function IsPacketPropertySupported ( _
g As Guid _
) As Boolean
'Usage
Dim instance As Tablets
Dim g As Guid
Dim returnValue As Boolean
returnValue = instance.IsPacketPropertySupported(g)
public bool IsPacketPropertySupported (
Guid g
)
public:
bool IsPacketPropertySupported (
Guid g
)
public boolean IsPacketPropertySupported (
Guid g
)
public function IsPacketPropertySupported (
g : Guid
) : boolean
Not applicable.
Parameters
- g
The Guid identifier for the requested PacketProperty field.
Return Value
Returns a value that indicates whether a PacketProperty field, identified with a globally unique identifier (GUID), is supported by all Tablet objects in this Tablets collection.
Value |
Meaning |
---|---|
true |
The PacketProperty field is supported throughout this Tablets collection. |
false |
The PacketProperty field is not supported throughout this Tablets collection. |
Remarks
This method determines if a Tablets collection supports various fields of the PacketProperty class.
Note
When this method is called on the Tablets collection, it queries all of the tablets on the system. If any of them does not support the property, it returns false. Call the Tablet.IsPacketPropertySupported method on an individual Tablet object to determine whether the device supports a known property.
Example
This C# example reports which PacketProperty fields are available for all Tablet objects in the Tablets collection, allTablets
.
using Microsoft.Ink;
// . . .
public string ReportOnAllTablets()
{
Tablets allTablets = new Tablets();
string theReport = "";
// Report on which PacketProperties are supported for all tablets.
theReport += "PacketProperties Supported:";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.AltitudeOrientation) ? "AltitudeOrientation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.AzimuthOrientation) ? "AzimuthOrientation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.ButtonPressure) ? "ButtonPressure " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.NormalPressure) ? "NormalPressure " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.PacketStatus) ? "PacketStatus " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.PitchRotation) ? "PitchRotation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.RollRotation) ? "RollRotation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.SerialNumber) ? "SerialNumber " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.TangentPressure) ? "TangentPressure " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.TimerTick) ? "TimerTick " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.TwistOrientation) ? "TwistOrientation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.X) ? "X " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.XTiltOrientation) ? "XTiltOrientation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.Y) ? "Y " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.YawRotation) ? "YawRotation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.YTiltOrientation) ? "YTiltOrientation " : "";
theReport += allTablets.IsPacketPropertySupported(PacketProperty.Z) ? "Z " : "";
return theReport;
}
This Microsoft® Visual Basic® .NET example reports which PacketProperty fields are available for all Tablet objects in the Tablets collection, allTablets
.
Imports Microsoft.Ink
' . . .
Public Function ReportOnAllTablets() As String
Dim allTablets As Tablets = New Tablets()
' Report on which PacketProperties are supported for all tablets.
Dim theReport As String = "IsPacketPropertySupported: "
If allTablets.IsPacketPropertySupported(PacketProperty.AltitudeOrientation) Then
theReport &= "AltitudeOrientation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.AzimuthOrientation) Then
theReport &= "AzimuthOrientation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.ButtonPressure) Then
theReport &= "ButtonPressure "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.NormalPressure) Then
theReport &= "NormalPressure "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.PacketStatus) Then
theReport &= "PacketStatus "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.PitchRotation) Then
theReport &= "PitchRotation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.RollRotation) Then
theReport &= "RollRotation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.SerialNumber) Then
theReport &= "SerialNumber "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.TangentPressure) Then
theReport &= "TangentPressure "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.TimerTick) Then
theReport &= "TimerTick "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.TwistOrientation) Then
theReport &= "TwistOrientation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.X) Then
theReport &= "X "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.XTiltOrientation) Then
theReport &= "XTiltOrientation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.Y) Then
theReport &= "Y "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.YawRotation) Then
theReport &= "YawRotation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.YTiltOrientation) Then
theReport &= "YTiltOrientation "
End If
If allTablets.IsPacketPropertySupported(PacketProperty.Z) Then
theReport &= "Z "
End If
Return theReport
End Function
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
Tablets Class
Tablets Members
Microsoft.Ink Namespace
PacketProperty
Microsoft.Ink.Stroke.GetPacketData
Microsoft.Ink.Stroke.SetPacketValuesByProperty
Tablet.IsPacketPropertySupported