Share via


InkOverlay.InkOverlay(Control, Boolean) Constructor

Initializes a new instance of the InkOverlay class, attaches it to the specified control, and determines whether to use the mouse for input.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Sub New ( _
    attachedControl As Control, _
    useMouseForInput As Boolean _
)
'Usage
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
)
Not applicable.

Parameters

  • attachedControl
    The control to which the InkOverlay object is attached.
  • useMouseForInput
    Set to true to use the mouse for tablet input; otherwise false.

Example

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

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

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkOverlay Class
InkOverlay Members
Microsoft.Ink Namespace
InkOverlay