Tablet.HardwareCapabilities 属性
从定义 Tablet 对象的硬件功能的 TabletHardwareCapabilities 枚举获取一个值。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public ReadOnly Property HardwareCapabilities As TabletHardwareCapabilities
用法
Dim instance As Tablet
Dim value As TabletHardwareCapabilities
value = instance.HardwareCapabilities
public TabletHardwareCapabilities HardwareCapabilities { get; }
public:
property TabletHardwareCapabilities HardwareCapabilities {
TabletHardwareCapabilities get ();
}
/** @property */
public TabletHardwareCapabilities get_HardwareCapabilities()
public function get HardwareCapabilities () : TabletHardwareCapabilities
属性值
类型:Microsoft.Ink.TabletHardwareCapabilities
Tablet 对象的硬件功能。
备注
Tablet 对象的硬件功能包括光标是否必须与 Tablet 实际接触才报告其位置,以及数字化仪 是否与显示屏集成。使用按位比较确定某个特定 Tablet 对象对应有哪些硬件功能。有关硬件功能值的完整列表,请参见 TabletHardwareCapabilities 枚举类型。
备注
如果在某些消息处理程序内调用此函数,则可以重新进入此函数,从而导致意外的结果。在处理以下任一消息时,请注意避免可重入调用:WM_ACTIVATE、WM_ACTIVATEAPP、WM_NCACTIVATE、WM_PAINT;WM_SYSCOMMAND(如果 wParam 设置为 SC_HOTKEY 或 SC_TASKLIST);以及 WM_SYSKEYDOWN(处理 Alt-Tab 或 Alt-Esc 组合键时)。这是单线程单元模型应用程序的问题。
示例
此示例报告 Tablets 集合中的默认 Tablet 对象的即插即用 ID、硬件功能以及最大输入矩形。
Public Function Report_Hardware_DefaultTablet() As String
Dim SB As StringBuilder = New StringBuilder(1024)
Dim defTablet As Tablet = New Tablets().DefaultTablet
' report on the hardware capabilities of the default tablet
SB.AppendLine("Hardware capabilities of the default tablet: " + defTablet.Name)
SB.AppendLine("PlugAndPlayId: " + defTablet.PlugAndPlayId)
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.CursorMustTouch) <> 0 Then
SB.AppendLine("CursorMustTouch: YES")
Else
SB.AppendLine("CursorMustTouch: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.CursorsHavePhysicalIds) <> 0 Then
SB.AppendLine("CursorsHavePhysicalIds: YES")
Else
SB.AppendLine("CursorsHavePhysicalIds: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.HardProximity) <> 0 Then
SB.AppendLine("HardProximity:: YES")
Else
SB.AppendLine("HardProximity:: NO")
End If
If (defTablet.HardwareCapabilities And TabletHardwareCapabilities.Integrated) <> 0 Then
SB.AppendLine("Integrated: YES")
Else
SB.AppendLine("Integrated: NO")
End If
SB.AppendLine("MaximumInputRectangle " + defTablet.MaximumInputRectangle.ToString())
Return SB.ToString()
End Function
public string Report_Hardware_DefaultTablet()
{
StringBuilder SB = new StringBuilder(1024);
Tablet defTablet = new Tablets().DefaultTablet;
// report on the hardware capabilities of the default tablet
SB.AppendLine("Hardware capabilities of the default tablet: " + defTablet.Name);
SB.AppendLine("PlugAndPlayId: " + defTablet.PlugAndPlayId);
SB.AppendLine("CursorMustTouch: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.CursorMustTouch) != 0) ? "YES" : "NO"));
SB.AppendLine("CursorsHavePhysicalIds: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.CursorsHavePhysicalIds) != 0) ? "YES" : "NO"));
SB.AppendLine("HardProximity: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.HardProximity) != 0) ? "YES" : "NO"));
SB.AppendLine("Integrated: " +
(((defTablet.HardwareCapabilities & TabletHardwareCapabilities.Integrated) != 0) ? "YES" : "NO"));
SB.AppendLine("MaximumInputRectangle " + defTablet.MaximumInputRectangle.ToString());
return SB.ToString();
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0