TabletDeviceType 枚举

定义

定义 Tablet 设备所使用的设备类型的值。Defines values for the type of devices the tablet device uses.

public enum class TabletDeviceType
public enum TabletDeviceType
type TabletDeviceType = 
Public Enum TabletDeviceType
继承
TabletDeviceType

字段

Stylus 0

指示 Tablet 设备为触笔。Indicates the tablet device is a stylus.

Touch 1

指示 Tablet 设备为触摸屏。Indicates the tablet device is a touch screen.

示例

下面的示例演示如何确定 tablet 设备的类型。The following example demonstrates how to determine the type of tablet device.

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

适用于