Share via


InkCollector Constructor (Control, Boolean)

Creates an InkCollector object, 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 InkCollector(attachedControl, _
    useMouseForInput)
public InkCollector(
    Control attachedControl,
    bool useMouseForInput
)
public:
InkCollector(
    Control^ attachedControl, 
    bool useMouseForInput
)
public function InkCollector(
    attachedControl : Control, 
    useMouseForInput : boolean
)

Parameters

  • useMouseForInput
    Type: System.Boolean

    Set to true to use the mouse for tablet input; otherwise false.

Examples

This C# example initializes a new instance of the InkCollector object, theInkCollector, 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
{
    InkCollector theInkCollector;

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

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

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

This Microsoft Visual Basic .NET example initializes a new instance of the InkCollector object, theInkCollector, 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 theInkCollector As InkCollector

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

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

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkCollector Class

InkCollector Members

InkCollector Overload

Microsoft.Ink Namespace

InkCollector