InkOverlay Constructor (IntPtr, Boolean)
Initializes a new instance of the InkOverlay class, attaches it to the specified window handle, and determines whether to use the mouse for input.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub New ( _
handle As IntPtr, _
useMouseForInput As Boolean _
)
'Usage
Dim handle As IntPtr
Dim useMouseForInput As Boolean
Dim instance As New InkOverlay(handle, _
useMouseForInput)
public InkOverlay(
IntPtr handle,
bool useMouseForInput
)
public:
InkOverlay(
IntPtr handle,
bool useMouseForInput
)
public function InkOverlay(
handle : IntPtr,
useMouseForInput : boolean
)
Parameters
handle
Type: System.IntPtrThe handle of the window to which the InkOverlay object is attached.
useMouseForInput
Type: System.BooleanSet to true to use the mouse for tablet input; otherwise false.
Remarks
The newly created InkOverlay can collect ink on the specified window surface.
Security Note: |
---|
If using under partial trust, this constructor requires SecurityPermissionFlag.UnmanagedCode permission, in addition to the permissions required by InkOverlay. See Security and Trust for more information. |
Examples
This C# example initializes a new instance of the InkOverlay object, theInkOverlay, associates it with the window handle of the form, indicates that the mouse is not used for input, 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(Handle, 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 window handle of the form, indicates that the mouse is not used for input, and then 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(Handle, False)
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