InkEdit Class

The InkEdit control enables you to collect ink, recognize it, and display it as text. With the InkEdit control, you can enable smart forms, which improves the accuracy of text input.

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

Syntax

'Declaration
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Class InkEdit _
    Inherits RichTextBox
'Usage
Dim instance As InkEdit
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class InkEdit : RichTextBox
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public ref class InkEdit : public RichTextBox
public class InkEdit extends RichTextBox

Remarks

This control is a superset of the RichTextBox control. It extends the RichTextBox control with the ability to capture, recognize, and display ink.

If an enumeration, event, method, or property of the RichTextBox control is not documented below, then it is not overridden in the InkEdit control and may be used exactly as described in the RichTextBox control documentation. In particular, values and parameters described as valid only with a RichTextBox control, such as the RichNoOleObjs enumeration field, work identically with the InkEdit control because it is a RichTextBox control.

Warning

To avoid a memory leak you must explicitly call the Dispose method on any InkEdit object to which an event handler has been attached before the object goes out of scope.

You can use the InkEdit control with Windows Vista. You can not use the InkEdit control to render ink in Microsoft Windows 2000, Windows Server 2003, and any edition of Windows XP other than Windows XP Tablet PC Edition. You can input ink, accept gestures, or recognize handwriting only under the following conditions:

  • Ink can be input and recognized only if Windows XP Tablet PC Edition is installed.

  • Gestures can be recognized only if Windows XP Tablet PC Edition is installed.

  • Handwriting can be recognized as text if the handwriting originated elsewhere and if recognizers are present.

If using Windows 2000, Windows Server 2003, or any edition of Windows XP other than Tablet PC Edition, you can assign values to the InkEdit control's ambient properties and can copy and paste ink to other applications, but the value of its InkMode property is Disabled.

Intelligent space insertion is available only when the Windows XP Tablet PC Edition is installed.

Files with embedded Ink objects can be loaded and displayed in any edition of Windows XP (including Windows XP Tablet PC Edition) and on systems that may have only the Tablet PC SDK installed. However, the embedded Ink objects can be converted to text only when Windows XP Tablet PC Edition is installed.

For more information about ink controls, see Ink Controls.

For information about which threads raise particular events, see Threads on Which an Event Can Fire.

To improve your application's performance, manually dispose of an InkEdit control when it is no longer needed.

Security noteSecurity Note:

If using under partial trust, this class and all its methods require SafeTopLevelWindows permission. See Security and Trust for more information.

The managed version of the InkEdit control wraps the COM InkEdit Control. The managed InkEdit control's constructor, Divide method, LineHeight property, RecognizerContext property, and Strokes property will all throw a Marshal.ThrowExceptionForHR exception if the COM InkEdit returns an error. See the InkEdit Control Reference topics for details on the errors that can be returned.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Windows.Forms.Control
        System.Windows.Forms.TextBoxBase
          System.Windows.Forms.RichTextBox
            Microsoft.Ink.InkEdit

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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

InkEdit Members

Microsoft.Ink Namespace

InkCollector

InkOverlay

InkPicture

RecognizerContext

RecognitionResult