Tablet.IsPacketPropertySupported, méthode
Mise à jour : November 2007
Retourne une valeur qui indique si un champ PacketProperty, ayant un identificateur global unique (GUID), est pris en charge par cet objet Tablet.
Espace de noms : Microsoft.Ink
Assembly : Microsoft.Ink (dans Microsoft.Ink.dll)
Syntaxe
'Déclaration
Public Function IsPacketPropertySupported ( _
id As Guid _
) As Boolean
'Utilisation
Dim instance As Tablet
Dim id As Guid
Dim returnValue As Boolean
returnValue = instance.IsPacketPropertySupported(id)
public bool IsPacketPropertySupported(
Guid id
)
public:
bool IsPacketPropertySupported(
Guid id
)
public boolean IsPacketPropertySupported(
Guid id
)
public function IsPacketPropertySupported(
id : Guid
) : boolean
Paramètres
- id
Type : System.Guid
Identificateur Guid (page pouvant être en anglais) pour le PacketProperty que vous vérifiez.
Valeur de retour
Type : System.Boolean
Retourne une valeur qui indique si un champ PacketProperty, ayant un identificateur global unique (GUID), est pris en charge par cet objet Tablet.
Valeur |
Signification |
---|---|
true |
Le champ PacketProperty est pris en charge par cet objet Tablet. |
false |
Le champ PacketProperty n'est pas pris en charge par cet objet Tablet. |
Notes
Cette méthode détermine si un objet Tablet prend en charge différents champs de la classe PacketProperty.
Remarque : |
---|
Cette fonction peut être exécutée à nouveau si elle est appelée dans certains gestionnaires de messages et provoquer des résultats inattendus. Prenez soin d'éviter un appel réentrant lors de la gestion de l'un des messages suivants : WM_ACTIVATE, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_PAINT; WM_SYSCOMMAND si wParam a la valeur SC_HOTKEY ou SC_TASKLIST, et WM_SYSKEYDOWN (lors de l'utilisation des raccourcis clavier Alt+Tab ou Alt+Echap). Cette opération pose problème dans les applications de modèle de thread unique cloisonné. |
Exemples
Cet exemple signale quels champs PacketProperty sont disponibles pour l'objet Tablet par défaut de la collection Tablets.
Private Function Report_Properties_DefaultTablet() As String
Dim SB As StringBuilder = New StringBuilder(1024)
Dim defTablet As Tablet = New Tablets().DefaultTablet
' Generate a report on which PacketProperties are supported by the default tablet.
SB.AppendLine("Packet Properties supported by the default tablet: " + defTablet.Name)
If defTablet.IsPacketPropertySupported(PacketProperty.AltitudeOrientation) Then
SB.AppendLine("AltitudeOrientation: YES")
Else
SB.AppendLine("AltitudeOrientation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.AzimuthOrientation) Then
SB.AppendLine("AzimuthOrientation: YES")
Else
SB.AppendLine("AzimuthOrientation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.ButtonPressure) Then
SB.AppendLine("ButtonPressure: YES")
Else
SB.AppendLine("ButtonPressure: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.NormalPressure) Then
SB.AppendLine("NormalPressure: YES")
Else
SB.AppendLine("NormalPressure: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.PacketStatus) Then
SB.AppendLine("PacketStatus: YES")
Else
SB.AppendLine("PacketStatus: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.PitchRotation) Then
SB.AppendLine("PitchRotation: YES")
Else
SB.AppendLine("PitchRotation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.RollRotation) Then
SB.AppendLine("RollRotation: YES")
Else
SB.AppendLine("RollRotation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.SerialNumber) Then
SB.AppendLine("SerialNumber: YES")
Else
SB.AppendLine("SerialNumber: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.TangentPressure) Then
SB.AppendLine("TangentPressure: YES")
Else
SB.AppendLine("TangentPressure: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.TimerTick) Then
SB.AppendLine("TimerTick: YES")
Else
SB.AppendLine("TimerTick: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.TwistOrientation) Then
SB.AppendLine("TwistOrientation: YES")
Else
SB.AppendLine("TwistOrientation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.X) Then
SB.AppendLine("X: YES")
Else
SB.AppendLine("X: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.XTiltOrientation) Then
SB.AppendLine("XTiltOrientation: YES")
Else
SB.AppendLine("XTiltOrientation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.Y) Then
SB.AppendLine("Y: YES")
Else
SB.AppendLine("Y: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.YawRotation) Then
SB.AppendLine("YawRotation: YES")
Else
SB.AppendLine("YawRotation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.YTiltOrientation) Then
SB.AppendLine("YTiltOrientation: YES")
Else
SB.AppendLine("YTiltOrientation: NO")
End If
If defTablet.IsPacketPropertySupported(PacketProperty.Z) Then
SB.AppendLine("Z: YES")
Else
SB.AppendLine("Z: NO")
End If
Return SB.ToString
End Function
public string Report_Properties_DefaultTablet()
{
StringBuilder SB = new StringBuilder(1024);
Tablet defTablet = new Tablets().DefaultTablet;
// Generate a report on which PacketProperties are supported by the default tablet.
SB.AppendLine("Packet Properties supported by the default tablet: " + defTablet.Name);
SB.AppendLine("AltitudeOrientation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.AltitudeOrientation)) ? "YES" : "NO"));
SB.AppendLine("AzimuthOrientation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.AzimuthOrientation)) ? "YES" : "NO"));
SB.AppendLine("ButtonPressure: " + ((defTablet.IsPacketPropertySupported(PacketProperty.ButtonPressure)) ? "YES" : "NO"));
SB.AppendLine("NormalPressure: " + ((defTablet.IsPacketPropertySupported(PacketProperty.NormalPressure)) ? "YES" : "NO"));
SB.AppendLine("PacketStatus: " + ((defTablet.IsPacketPropertySupported(PacketProperty.PacketStatus)) ? "YES" : "NO"));
SB.AppendLine("PitchRotation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.PitchRotation)) ? "YES" : "NO"));
SB.AppendLine("RollRotation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.RollRotation)) ? "YES" : "NO"));
SB.AppendLine("SerialNumber: " + ((defTablet.IsPacketPropertySupported(PacketProperty.SerialNumber)) ? "YES" : "NO"));
SB.AppendLine("TangentPressure: " + ((defTablet.IsPacketPropertySupported(PacketProperty.TangentPressure)) ? "YES" : "NO"));
SB.AppendLine("TimerTick: " + ((defTablet.IsPacketPropertySupported(PacketProperty.TimerTick)) ? "YES" : "NO"));
SB.AppendLine("TwistOrientation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.TwistOrientation)) ? "YES" : "NO"));
SB.AppendLine("X: " + ((defTablet.IsPacketPropertySupported(PacketProperty.X)) ? "YES" : "NO"));
SB.AppendLine("XTiltOrientation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.XTiltOrientation)) ? "YES" : "NO"));
SB.AppendLine("Y: " + ((defTablet.IsPacketPropertySupported(PacketProperty.Y)) ? "YES" : "NO"));
SB.AppendLine("YawRotation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.YawRotation)) ? "YES" : "NO"));
SB.AppendLine("YTiltOrientation: " + ((defTablet.IsPacketPropertySupported(PacketProperty.YTiltOrientation)) ? "YES" : "NO"));
SB.AppendLine("Z: " + ((defTablet.IsPacketPropertySupported(PacketProperty.Z)) ? "YES" : "NO"));
return SB.ToString();
}
Plateformes
Windows Vista
Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Informations de version
.NET Framework
Pris en charge dans : 3.0