Ink-Enabled Text Box Sample

To get samples and instructions for installing them

  • Do one or more of the following:

    • On the Help menu, click Samples.

      The Readme displays information about samples.

    • Visit the Visual Studio 2008 Samples Web site. The most recent versions of samples are available there.

    • Locate samples on the computer on which Visual Studio is installed. By default, samples and a Readme file are installed in drive:\Program Files\Microsoft Visual Studio 9.0\Samples\lcid. For Express editions of Visual Studio, all samples are located online.

For more information, see Locating Sample Files.

To view the sample documentation

  1. In Solution Explorer, double-click the Documentation folder.

  2. If you are using Visual Basic Express Edition, right-click ReadMe.htm in the Documentation folder and then click View in Browser. If you are using another version of Visual Basic, double-click ReadMe.htm in the Documentation folder.

Demonstrates

Microsoft Windows XP Tablet PC Edition 2005 provides the Pen Input Panel (PIP). The PIP automatically enables text input in the form of freeform handwriting, individual characters, or characters from an on-screen QWERTY keyboard. This is the simplest and often the best solution for text entry in a Tablet PC application.

Controls that support the Text Framework Services additionally enable users to correct misrecognitions on a word-by-word basis after the initial recognition.

It is easy to use an InkOverlay together with a Timer and the handwriting recognition APIs to create a customized ink-enabled TextBox.

This sample demonstrates the use of PIP, Text Framework Services, and InkOverlay. First, a simple TextBox into which data is entered from the PIP is demonstrated. Second, the Text Framework Services capabilities of a RichTextBox are demonstrated: after entering text with the PIP, select a word and the PIP will reappear, displaying alternatives for that word. Finally, a TextBox, InkOverlay, and Timer are used to enable ink-gathering on the surface of the TextBox. After the Interval of the Timer expires without any new Strokes added, the ink is recognized and the text is added to the TextBox.

This sample requires that the following be installed:

  • Visual Studio

  • Tablet PC Platform SDK

  • Windows XP Tablet PC Edition 2005