TabletDeviceType Enum
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Definierar värden för den typ av enheter som surfplattan använder.
public enum class TabletDeviceType
public enum TabletDeviceType
type TabletDeviceType =
Public Enum TabletDeviceType
- Arv
Fält
| Name | Värde | Description |
|---|---|---|
| Stylus | 0 | Anger att surfplattan är en penna. |
| Touch | 1 | Anger att surfplattan är en pekskärm. |
Exempel
I följande exempel visas hur du avgör vilken typ av surfplatta som ska användas.
// Get the type of tablet device
TabletDeviceType myTabletDeviceType = myTabletDevice.Type;
// Display the type of tablet device
textbox1.AppendText("Type: ");
switch (myTabletDeviceType)
{
case TabletDeviceType.Stylus:
textbox1.AppendText("Stylus\n");
break;
default: // TabletDeviceType.Touch:
textbox1.AppendText("Touch Pad\n");
break;
}
' Get the type of tablet device
Dim myTabletDeviceType As TabletDeviceType = myTabletDevice.Type
' Display the type of tablet device
textbox1.AppendText("Type: ")
Select Case myTabletDeviceType
Case TabletDeviceType.Stylus
textbox1.AppendText("Stylus" & vbCrLf)
Case Else ' TabletDeviceType.Touch
textbox1.AppendText("Touch pad" & vbCrLf)
End Select