InkOverlay 构造函数 (Control, Boolean)

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

命名空间:  Microsoft.Ink
程序集:  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 InkOverlay(attachedControl, _
    useMouseForInput)
public InkOverlay(
    Control attachedControl,
    bool useMouseForInput
)
public:
InkOverlay(
    Control^ attachedControl, 
    bool useMouseForInput
)
public InkOverlay(
    Control attachedControl,
    boolean useMouseForInput
)
public function InkOverlay(
    attachedControl : Control, 
    useMouseForInput : boolean
)

参数

  • useMouseForInput
    类型:System.Boolean
    若要使用鼠标进行 Tablet 输入,则设置为 true;否则设置为 false。

示例

此 C# 示例初始化 InkOverlay 对象的新实例 theInkOverlay,将该实例与窗体相关联,指示不使用鼠标进行输入,然后启用该实例。

using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.Ink;

class MinimumInkApp : System.Windows.Forms.Form
{
    InkOverlay theInkOverlay;

    public MinimumInkApp()
    {
        // Initialize the form.
        this.Text = "Minimum Ink Application";

        // Create and enable theInkOverlay.
        theInkOverlay = new InkOverlay(this, false);
        theInkOverlay.Enabled = true;
    }

    public static void Main()
    {
        Application.Run(new MinimumInkApp());
    }
}

此 Microsoft Visual Basic .NET 示例初始化 InkOverlay 对象的新实例 theInkOverlay,将该实例与窗体相关联,指示不使用鼠标进行输入,然后启用该实例。

Imports System.Windows.Forms
Imports Microsoft.Ink
Public Class MinimumInkApp
    Inherits System.Windows.Forms.Form

    Dim theInkOverlay As InkOverlay

    Public Sub New()
        MyBase.New()
        'Initialize the form.
        Me.Text = "Minimum Ink Application"
        'Create and enable theInkOverlay.
        theInkOverlay = New InkOverlay(Me, False)
        theInkOverlay.Enabled = True
    End Sub

    Public Shared Sub Main()
        Application.Run(New MinimumInkApp())
    End Sub
End Class

平台

Windows Vista

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkOverlay 类

InkOverlay 成员

InkOverlay 重载

Microsoft.Ink 命名空间

InkOverlay