Proprietà Tablet.PlugAndPlayId
Aggiornamento: novembre 2007
Ottiene una rappresentazione di stringa dell'identificatore Plug and Play dell'oggetto Tablet.
Spazio dei nomi: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Sintassi
'Dichiarazione
Public ReadOnly Property PlugAndPlayId As String
'Utilizzo
Dim instance As Tablet
Dim value As String
value = instance.PlugAndPlayId
public string PlugAndPlayId { get; }
public:
property String^ PlugAndPlayId {
String^ get ();
}
/** @property */
public String get_PlugAndPlayId()
public function get PlugAndPlayId () : String
Valore proprietà
Tipo: System.String
Identificatore Plug and Play dell'oggetto Tablet.
Note
Il valore restituito è basato sull'elemento HIDD_ATTRIBUTES.ProductID. Il produttore del dispositivo del Tablet PC è responsabile dell'aggiunta di questa stringa. Il valore restituito è vuoto se il dispositivo del Tablet PC non dispone di un identificatore.
Nota
Se chiamata all'interno di alcuni gestori di messaggi è possibile che questa funzione venga reimmessa, provocando risultati imprevisti. Prestare attenzione per evitare una chiamata rientrante durante la gestione di uno dei messaggi seguenti: WM_ACTIVATE, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_PAINT, WM_SYSCOMMAND se il parametro wParam è impostato su SC_HOTKEY o SC_TASKLIST e WM_SYSKEYDOWN (durante l'elaborazione delle combinazioni di tasti ALT-TAB o ALT-ESC). Questo problema è relativo alle applicazioni con modello di apartment a thread singolo.
Esempi
In questo esempio vengono segnalati l'ID Plug and Play, le capacità hardware e il rettangolo di input massimo dell'oggetto Tablet predefinito nell'insieme Tablets.
Public Function Report_Hardware_DefaultTablet() As String
Dim SB As StringBuilder = New StringBuilder(1024)
Dim defTablet As Tablet = New Tablets().DefaultTablet
' report on the hardware capabilities of the default tablet
SB.AppendLine("Hardware capabilities of the default tablet: " + defTablet.Name)
SB.AppendLine("PlugAndPlayId: " + defTablet.PlugAndPlayId)
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.CursorMustTouch) <> 0 Then
SB.AppendLine("CursorMustTouch: YES")
Else
SB.AppendLine("CursorMustTouch: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.CursorsHavePhysicalIds) <> 0 Then
SB.AppendLine("CursorsHavePhysicalIds: YES")
Else
SB.AppendLine("CursorsHavePhysicalIds: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.HardProximity) <> 0 Then
SB.AppendLine("HardProximity:: YES")
Else
SB.AppendLine("HardProximity:: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.Integrated) <> 0 Then
SB.AppendLine("Integrated: YES")
Else
SB.AppendLine("Integrated: NO")
End If
SB.AppendLine("MaximumInputRectangle " + defTablet.MaximumInputRectangle.ToString())
Return SB.ToString()
End Function
public string Report_Hardware_DefaultTablet()
{
StringBuilder SB = new StringBuilder(1024);
Tablet defTablet = new Tablets().DefaultTablet;
// report on the hardware capabilities of the default tablet
SB.AppendLine("Hardware capabilities of the default tablet: " + defTablet.Name);
SB.AppendLine("PlugAndPlayId: " + defTablet.PlugAndPlayId);
SB.AppendLine("CursorMustTouch: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.CursorMustTouch) != 0) ? "YES" : "NO"));
SB.AppendLine("CursorsHavePhysicalIds: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.CursorsHavePhysicalIds) != 0) ? "YES" : "NO"));
SB.AppendLine("HardProximity: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.HardProximity) != 0) ? "YES" : "NO"));
SB.AppendLine("Integrated: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.Integrated) != 0) ? "YES" : "NO"));
SB.AppendLine("MaximumInputRectangle " + defTablet.MaximumInputRectangle.ToString());
return SB.ToString();
}
Piattaforme
Windows Vista
.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.
Informazioni sulla versione
.NET Framework
Supportato in: 3.0