Compartir a través de


InkEdit Class

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

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

Syntax

'Declaration
Public Class InkEdit
    Inherits RichTextBox
'Usage
Dim instance As InkEdit
public class InkEdit : RichTextBox
public ref class InkEdit : public RichTextBox
public class InkEdit extends RichTextBox
public class InkEdit extends RichTextBox
Not applicable.

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 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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkEdit Members
Microsoft.Ink Namespace
InkCollector
InkOverlay
InkPicture
RecognizerContext
RecognitionResult