Partager via


Accessing and Manipulating Pen Input

Accessing and Manipulating Pen Input

Overview of the StylusInput APIs.

The Tablet PC includes technology for interacting with tablet pen data as it is being gathered. The RealTimeStylus class is part of the StylusInput application programming interfaces (APIs), which provide access to the tablet pen data stream. These APIs allow you to capture, interrupt, and modify the stream independently from rendering and collecting ink.

The StylusInput APIs are designed to:

  • Lower the overall thread usage when collecting ink.
  • Provide real-time access to the tablet pen data stream.
  • Keep the user interface (UI) thread from blocking dynamic ink rendering by queuing the packet data on the UI thread and making ink collection single threaded.
  • Increase performance for collecting ink so that it is as good as the performance of other aspects of your application.

The StylusInput APIs are not designed to do the following.

  • The StylusInput APIs are not specifically designed to work with other methods for collecting ink.
  • The StylusInput APIs do not provide an Automation interface.

When you need to interact directly with the tablet pen data stream or when your application may block real-time inking, use the RealTimeStylus object. Use the InkCollector object, InkOverlay object, InkPicture control, or InkEdit control when the default behavior of these objects provides the behavior you need.

In This Section

The following sections describe elements of the StylusInput APIs