InkOverlay.Tablet 属性

获取 InkOverlay 对象当前用来收集输入的 Tablet 设备。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
<BrowsableAttribute(False)> _
Public ReadOnly Property Tablet As Tablet
用法
Dim instance As InkOverlay
Dim value As Tablet

value = instance.Tablet
[BrowsableAttribute(false)]
public Tablet Tablet { get; }
[BrowsableAttribute(false)]
public:
property Tablet^ Tablet {
    Tablet^ get ();
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public Tablet get_Tablet()
public function get Tablet () : Tablet

属性值

类型:Microsoft.Ink.Tablet
InkOverlay 对象当前用来收集输入的 Tablet 设备。

备注

备注

仅当 InkOverlay 只从一个 Tablet 收集墨迹时,此属性才有效。如果访问正从多个 Tablet 收集墨迹的 InkOverlay 的此属性,则会生成异常。

示例

此示例返回一份报告,其中列出 InkOverlay 对象 mInkObject 所引用的 Tablet 对象的属性。

Public Function InkObjectTabletReport() As String
    Dim Result As StringBuilder = New StringBuilder(512)
    ' Wrap access to the Tablet object in a try/catch block. 
    ' If mInkObject is in All Tablets mode, an exception will be 
    ' thrown when accessing the Tablet property.
    Try
        Result.AppendLine("The tablet associated mInkObject has the following properties:")
        ' accessing mInkObject.Tablet will throw an exception if in All Tablets mode
        ' mInkObject can be InkCollector, InkOverlay, or InkPicture
        Dim mTablet As Tablet = mInkObject.Tablet
        Result.AppendLine("Tablet Name: " + mTablet.Name)
        Result.AppendLine("Tablet PNP ID: " + mTablet.PlugAndPlayId)
        Result.AppendLine("Tablet Max Rect: " + mTablet.MaximumInputRectangle.ToString())
        Result.AppendLine("Tablet Capabilities: " + mTablet.HardwareCapabilities)

    Catch ex As System.Exception
        Result.AppendLine("mInkObject is in all tablets mode.")
        Result.AppendLine("The tablet report cannot be generated.")
    End Try

    Return Result.ToString()
End Function
public string InkObjectTabletReport()
{
    StringBuilder Result = new StringBuilder(512);

    // Wrap access to the Tablet object in a try/catch block. 
    // If mInkObject is in All Tablets mode, an exception will be 
    // thrown when accessing the Tablet property.
    try
    {
        Result.AppendLine("The  tablet associated with mInkObject has the following properties:");
        // accessing mInkObject.Tablet will throw an exception if in All Tablets mode
        // mInkObject can be InkCollector, InkOverlay, or InkPicture
        Tablet mTablet = mInkObject.Tablet;
        Result.AppendLine("Tablet Name: " + mTablet.Name);
        Result.AppendLine("Tablet PNP ID: " + mTablet.PlugAndPlayId);
        Result.AppendLine("Tablet Max Rect: " + mTablet.MaximumInputRectangle.ToString());
        Result.AppendLine("Tablet Capabilities: " + mTablet.HardwareCapabilities);
    }
    catch (System.Exception)
    {
        Result.AppendLine("mInkObject is in all tablets mode.");
        Result.AppendLine("The tablet report cannot be generated.");
    }

    return Result.ToString();
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkOverlay 类

InkOverlay 成员

Microsoft.Ink 命名空间

Tablet

InkOverlay.SetAllTabletsMode

InkOverlay.SetSingleTabletIntegratedMode