TabletDeviceType Enum
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menentukan nilai untuk jenis perangkat yang digunakan perangkat tablet.
public enum class TabletDeviceType
public enum TabletDeviceType
type TabletDeviceType =
Public Enum TabletDeviceType
- Warisan
Bidang
| Nama | Nilai | Deskripsi |
|---|---|---|
| Stylus | 0 | Menunjukkan perangkat tablet adalah stylus. |
| Touch | 1 | Menunjukkan perangkat tablet adalah layar sentuh. |
Contoh
Contoh berikut menunjukkan cara menentukan jenis perangkat tablet.
// 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