Share via


InkOverlay Constructor

Initializes a new instance of the InkOverlay class that is not yet associated with a window.

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

Syntax

'Declaration
Public Sub New
'Usage
Dim instance As New InkOverlay()
public InkOverlay()
public:
InkOverlay()
public function InkOverlay()

Remarks

Before collecting ink, an application must associate a window handle with the InkOverlay object. To create an InkOverlay object with an associated window handle, call the InkOverlay(IntPtr) constructor.

Examples

This C# example initializes a new instance of the InkOverlay object, theInkOverlay, associates it with the window handle of the form, and then 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();
        theInkOverlay.Handle = Handle;
        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, associating it with the window handle of the form, and then enabling 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()
        theInkOverlay.Handle = Handle
        theInkOverlay.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

InkOverlay Class

InkOverlay Members

InkOverlay Overload

Microsoft.Ink Namespace

InkOverlay