TabletDeviceType Wyliczenie

Definicja

Definiuje wartości dla typu urządzeń używanych przez urządzenie tabletu.

public enum class TabletDeviceType
public enum TabletDeviceType
type TabletDeviceType = 
Public Enum TabletDeviceType
Dziedziczenie
TabletDeviceType

Pola

Stylus 0

Wskazuje, że urządzenie tabletu jest rysikiem.

Touch 1

Wskazuje, że urządzenie tabletu jest ekranem dotykowym.

Przykłady

W poniższym przykładzie pokazano, jak określić typ urządzenia tabletu.

// 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

Dotyczy