RealTimeStylus 构造函数 (IntPtr)
初始化 RealTimeStylus 类的新实例,并将其附加到指定窗口。
命名空间: Microsoft.StylusInput
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Sub New ( _
handle As IntPtr _
)
用法
Dim handle As IntPtr
Dim instance As New RealTimeStylus(handle)
public RealTimeStylus(
IntPtr handle
)
public:
RealTimeStylus(
IntPtr handle
)
public RealTimeStylus(
IntPtr handle
)
public function RealTimeStylus(
handle : IntPtr
)
参数
- handle
类型:System.IntPtr
附加 RealTimeStylus 对象的窗口的句柄。如果此参数设置为 0,则构造函数将引发异常。
备注
对于新 RealTimeStylus 对象,最初将禁用墨迹收集,并且输入区域设置为 RealTimeStylus 对象附加到的窗口的边界。有关更多信息,请参见 Enabled 和 WindowInputRectangle 属性。
示例
此 C# 示例是窗体的 Load 事件处理程序中的代码段,它创建一个附加到 Panel 对象 thePanel 的 Handle 的 RealTimeStylus 对象。
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);
// ...
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0