InkCollector.InkCollector Constructor

InkCollector.InkCollector Constructor

Initializes a new instance of the InkCollector class.

Definition

Visual Basic .NET Public Sub InkCollector( _
ByVal attachedControl As Control, _
ByVal tablet As Tablet _
)
C# public InkCollector(
Control attachedControl,
Tablet tablet
);
Managed C++ public: InkCollector(
Control *attachedControl,
Tablet *tablet
);

Parameters

attachedControl System.Windows.Forms.Control. The control to which the InkCollector object is attached.
tablet Microsoft.Ink.Tablet. The Tablet object to which the new window of the InkCollector object is attached.

Remarks

Depending on which Tablet is chosen, the pen or the mouse may be used for input.

Examples

[C#]

This C# example initializes a new instance of the InkCollector object, theInkCollector, associates it with the window handle of the form and the default Tablet, and then 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.
        Tablets allTablets = new Tablets();
        theInkCollector = new InkCollector(this, allTablets.DefaultTablet);
        theInkCollector.Enabled = true;
    }

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

[VB.NET]

This Microsoft® Visual Basic® .NET example initializes a new instance of the InkCollector object, theInkCollector, associates it with the window handle of the form and the default Tablet, and then 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.
        Dim allTablets As New Tablets()
        theInkCollector = New InkCollector(Me, allTablets.DefaultTablet)
        theInkCollector.Enabled = True
    End Sub

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

See Also