|
|
YOUR FEEDBACK
|
TOP MICROSOFT .NET LINKS Tablet PC
Shiny New Tablets
Coming close to the paper near you
By: Dr. Neil Roodyn
Digg This!
The Tablet PC is nothing new. It is an evolutionary step upwards towards the dream of electronic paper. It is a big increment and represents one of the largest movements in that direction that we have seen for some time. For example to use the Tablet PC you don't have to learn a new way of writing, in fact, it even recognizes most of my joined-up writing, which is amazing because most human beings don't seem to be able to do that! But it is still not new. I remember working with the Pen for Windows SDK in the early 1990s and thinking "hey, wow, this is cool," and then the Newton from Apple and a host of PDA devices came along and they all tried to steal the thunder from paper. Yet in many ways traditional paper still contains some features that the technology has yet to tackle. It doesn't break when I drop it on the floor, it is very tactile, and I can fold it and carry it in my back pocket without worrying about sitting on it. Paper also accepts a wide variety of input devices - pens, markers, pencils, and erasers. So why use a Tablet PC? The electronic paper presented by a Tablet can do things you can't do with traditional paper. I can store all my notes in one place, I can stretch the page to squeeze new text between existing lines, I can connect it to Microsoft Outlook and e-mail notes, set tasks, and take minutes for meetings. The dream of the paperless office is one step closer, but in order to really make the difference we software developers have to write applications to take advantage of the new features and help add business value to our organisations through the use of the technology. The new Windows XP Tablet PC Edition 2005 has been released and the Tablet PC Platform SDK 1.7 is now available. You can download the SDK from http://msdn.microsoft.com/TabletPC. This new version of the platform ships at the same time that Tablet PCs are coming down in price and supporting more features. We are starting to see Tablet PCs with larger screens, Bluetooth support, faster CPUs, and more memory. At the same time, digitizer screens are being fitted to more conventional machines with prices only a couple of hundred dollars from the equivalent laptop. The new features presented in the SDK for us developers can be broken down into three areas: context, stylus input. and Web support. Context Context can be applied programmatically within the application code or via an additional XML file. The advantage of using the XML file is that you can apply the context for a set of input fields without having to change the code of an existing application. Adding the code to recognize with context is simple: // Create a recognizer context from the recognizer You'll notice that the Factoid property is a string. Currently there are around 50 constants defined in the SDK. In the COM API these context strings are defined in an enumerated type. Managed code developers currently have no default-type safe mechanism. I would suggest that if you are going to heavily use context strings you define your own enumerated type. Stylus Input To solve this problem the Tablet development team have produced the RealTimeStylus (RTS) class. The RTS allows you to programmatically trap the events produced from the stylus. The RealTimeStylus class provides a queue that holds the events generated from the stylus. This queue is filled from a separate thread so as to not impact the UI performance. In order to use the events in the queue you need to create a class that implements IstylusSyncPlugin (see Listing 1). An object that supports the IStylusPlugin is called a RealTimeEventSink object. By creating your own RealTimeEventSink objects you can customize how the ink gets displayed. You can also use build a gesture recognizer this way. The Framework provides a DynamicRenderer and GestureRecognizer; you can use these to get started. In the CustomRenderer class the Packets are intercepted from the queue and being used to draw small blue circles on the Graphics object. The RealTimeStylus queue is a fixed size. The fixed size means that if you implement something which is processor intensive you may lose some packet data. With regular sized packets the queue can buffer approximately 10 seconds of packet data. In order to use the CustomRenderer just defined you need a class that implements the IStylusPlugin interface (see Listing 2). In this example an instance of a CustomRenderer is added to the RealTimeStylus. The CustomRenderer will draw the blue circles in the GroupBox. I left out the details of the IStylusAsyncPlugin implementation because they are not required for this simple example. Web Support <OBJECT id="inkComment" height="200" width="400" It is then possible to call methods in the embedded object via JavaScript code on the webpage. If you plan to provide a substantial amount of Ink support on your Web site I suggest that you create a Web User control that hosts the Ink-enabled Windows control. To help you further, when a request for a Web page is made from a Tablet PC running Edition 2005, an identifier is placed in the UserAgent string. You can use this identifier to alter the way a Web site appears to a Tablet PC user (see Listing 4). Write On MICROSOFT .NET LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES
|
||||||||||||||||||||||||||||||||||