RealTimeStylus 构造函数 (IntPtr, Boolean)
初始化 RealTimeStylus 类的新实例,将其附加到指定窗口,并指定是否使用鼠标进行输入。
命名空间: Microsoft.StylusInput
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Sub New ( _
handle As IntPtr, _
useMouseForInput As Boolean _
)
用法
Dim handle As IntPtr
Dim useMouseForInput As Boolean
Dim instance As New RealTimeStylus(handle, _
useMouseForInput)
public RealTimeStylus(
IntPtr handle,
bool useMouseForInput
)
public:
RealTimeStylus(
IntPtr handle,
bool useMouseForInput
)
public RealTimeStylus(
IntPtr handle,
boolean useMouseForInput
)
public function RealTimeStylus(
handle : IntPtr,
useMouseForInput : boolean
)
参数
- handle
类型:System.IntPtr
附加 RealTimeStylus 对象的窗口的句柄。如果此参数设置为 0,则构造函数将引发异常。
- useMouseForInput
类型:System.Boolean
一个值,指示是否使用鼠标进行 Tablet 输入。值
含义
true
可以使用鼠标进行 Tablet 输入。
false
不能使用鼠标进行 Tablet 输入。
备注
对于新 RealTimeStylus 对象,最初将禁用墨迹收集,并且输入区域设置为 RealTimeStylus 对象附加到的窗口的边界。有关更多信息,请参见 Enabled 和 WindowInputRectangle 属性。
示例
此 C# 示例是窗体的 Load 事件处理程序中的代码段,它创建一个附加到 Panel 对象 thePanel 的 Handle 的 RealTimeStylus 对象。不使用鼠标进行 Tablet 输入,但可以使用所有其他 Tablet 对象。
using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;
// ...
// The panel where the tablet pen data is collected.
private System.Windows.Forms.Panel thePanel;
// The form's Load event handler.
private void theForm_Load(object sender, System.EventArgs e)
{
// ...
// Create the RealTimeStylus object.
this.theRealTimeStylus = new RealTimeStylus(this.thePanel.Handle, false);
// ...
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0