Partager via


InkOverlay.InkOverlay Constructor

InkOverlay.InkOverlay Constructor

Initializes a new instance of the InkOverlay class.

Definition

Visual Basic .NET Public Sub InkOverlay( _
ByVal attachedControl As Control, _
ByVal useMouseForInput As Boolean _
)
C# public InkOverlay(
Control attachedControl,
bool useMouseForInput
);
Managed C++ public: InkOverlay(
Control *attachedControl,
bool *useMouseForInput
);

Parameters

attachedControl System.Windows.Forms.Control. The control to which the InkOverlay object is attached.
useMouseForInput System.Boolean. Set to true to use the mouse for tablet input; otherwise false.

Examples

[C#]

This C# example initializes a new instance of the InkOverlay object, theInkOverlay, associates it with the form, indicates that the mouse is not used for input, and enables it.

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());
    }
}

[VB.NET]

This Microsoft® Visual Basic® .NET example initializes a new instance of the InkOverlay object, theInkOverlay, associates it with the form, indicates that the mouse is not used for input, and enables it.

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

See Also