Share via


Context-Enabled Form Sample

This sample shows some of the form features available on the Tablet PC.

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 Visual Studio Samples.

Security noteSecurity Note:

This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties.

To view the sample documentation

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

  2. If you are using Visual Basic Express, 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

One of the most powerful uses of Microsoft Windows XP Tablet PC Edition 2005 is for form-related activities. In most cases, you can do this without coding. The Context Tagging Tool provided with the Tablet PC Platform SDK enables you to specify field masks for use with any form-based application, without changing the source code. Windows XP Tablet PC Edition 2005 searches for a specially-formatted XML file when it loads an executable file. This XML file can contain context-sensitive masks or hints for the built-in Tablet Input Panel.

This sample illustrates the context-sensitive capabilities of Windows XP Tablet PC Edition 2005 explicitly in code. It shows values of the Factoid type and enables them to be selected. The code disallows the Word List factoid, which cannot be programmatically used with the PenInputPanel type (although it can be used with the Context Tagging Tool). When a user selects a factoid value, the PenInputPanel is used together with a standard TextBox control to demonstrate the context tagging.

This sample requires that the following be installed:

  • Visual Studio

  • Tablet PC Platform SDK

  • Windows XP Tablet PC Edition 2005

See Also

Reference

Programming the Tablet PC

Microsoft.Ink

Other Resources

Tablet PC Samples