RealTimeStylus 构造函数 (Control, Boolean)

初始化 RealTimeStylus 类的新实例,将其附加到指定控件,并指定是否使用鼠标进行输入。

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

语法

声明
Public Sub New ( _
    attachedControl As Control, _
    useMouseForInput As Boolean _
)
用法
Dim attachedControl As Control
Dim useMouseForInput As Boolean

Dim instance As New RealTimeStylus(attachedControl, _
    useMouseForInput)
public RealTimeStylus(
    Control attachedControl,
    bool useMouseForInput
)
public:
RealTimeStylus(
    Control^ attachedControl, 
    bool useMouseForInput
)
public RealTimeStylus(
    Control attachedControl,
    boolean useMouseForInput
)
public function RealTimeStylus(
    attachedControl : Control, 
    useMouseForInput : boolean
)

参数

  • attachedControl
    类型:System.Windows.Forms.Control
    附加 RealTimeStylus 对象的控件。如果此参数设置为 nullnull 引用(在 Visual Basic 中为 Nothing)(在 Visual Basic 中为 Nothing),则构造函数将引发异常。
  • useMouseForInput
    类型:System.Boolean
    一个值,指示是否使用鼠标进行 Tablet 输入。

    含义

    true

    可以使用鼠标进行 Tablet 输入。

    false

    不能使用鼠标进行 Tablet 输入。

备注

对于新 RealTimeStylus 对象,最初将禁用墨迹收集,并且输入区域设置为 RealTimeStylus 对象附加到的窗口的边界。有关更多信息,请参见 EnabledWindowInputRectangle 属性。

示例

此 Microsoft Visual C# .NET 示例是窗体的 Load 事件处理程序中的代码段,它创建一个附加到 Panel 对象 thePanel 的 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, false);

    // ...
}

平台

Windows Vista, Windows XP SP2, Windows Server 2003

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

RealTimeStylus 类

RealTimeStylus 成员

RealTimeStylus 重载

Microsoft.StylusInput 命名空间

Microsoft.Ink.Tablet