共用方式為


Tablet.DeviceKind 屬性

取得 TabletDeviceKind 值,這個值表示手寫板裝置的類型。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink (在 Microsoft.Ink.dll 中)

語法

'宣告
Public ReadOnly Property DeviceKind As TabletDeviceKind
'用途
Dim instance As Tablet
Dim value As TabletDeviceKind

value = instance.DeviceKind
public TabletDeviceKind DeviceKind { get; }
public:
property TabletDeviceKind DeviceKind {
    TabletDeviceKind get ();
}
/** @property */
public TabletDeviceKind get_DeviceKind()
public function get DeviceKind () : TabletDeviceKind

屬性值

型別:Microsoft.Ink.TabletDeviceKind
TabletDeviceKind 值,這個值表示手寫板裝置的類型。

備註

這個屬性為 Microsoft.Ink 6.0 版組件的新功能。

範例

在這個範例中,Button (英文) 物件 (變數名稱為 btOpenFile) 會根據使用的手寫板裝置類型而變成不同的大小。

Private Sub AdjustInterface(ByVal theTablet As Tablet)
    Select Case theTablet.DeviceKind
        Case TabletDeviceKind.Mouse
            btOpenFile.Size = New Size(24, 24)
        Case TabletDeviceKind.Pen
            btOpenFile.Size = New Size(32, 32)
        Case TabletDeviceKind.Touch
            btOpenFile.Size = New Size(48, 48)
    End Select
End Sub
private void AdjustInterface(Tablet theTablet)
{
    switch (theTablet.DeviceKind)
    {
        case TabletDeviceKind.Mouse:
            btOpenFile.Size = new Size(24, 24);
            break;
        case TabletDeviceKind.Pen:
            btOpenFile.Size = new Size(32, 32);
            break;
        case TabletDeviceKind.Touch:
            btOpenFile.Size = new Size(48, 48);
            break;
    }
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

Tablet 類別

Tablet 成員

Microsoft.Ink 命名空間