Tablet.MaximumInputRectangle 属性
获取 Tablet 对象所支持的最大输入矩形(采用 Tablet 设备坐标)。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public ReadOnly Property MaximumInputRectangle As Rectangle
用法
Dim instance As Tablet
Dim value As Rectangle
value = instance.MaximumInputRectangle
public Rectangle MaximumInputRectangle { get; }
public:
property Rectangle MaximumInputRectangle {
Rectangle get ();
}
/** @property */
public Rectangle get_MaximumInputRectangle()
public function get MaximumInputRectangle () : Rectangle
属性值
类型:System.Drawing.Rectangle
Tablet 所支持的最大输入矩形(采用 Tablet 设备坐标)。
备注
MaximumInputRectangle 属性返回的矩形负责指定可以绘制墨迹 的最大空间范围。
备注
如果在某些消息处理程序内调用此函数,则可以重新进入此函数,从而导致意外的结果。在处理以下任一消息时,请注意避免可重入调用: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