TabletDeviceType 列舉

定義

定義 Tablet 裝置所使用的裝置型別值。

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

欄位

Stylus 0

表示 Tablet 裝置為手寫筆。

Touch 1

表示 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

適用於