Microsoft Cloud Authors: Pat Romanski, Andreas Grabner, Nick Basinger, Kevin Benedict, Liz McMillan

Related Topics: Microsoft Cloud

Microsoft Cloud: Article

Shiny New Tablets

Coming close to the paper near you

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.

The context support provides hints to the TIP (Tablet Input Panel) in order to aid the recognition process. For example, you may wish to tag a TextBox as a phone number field. The recognizer will then use this guidance to improve the accuracy of the recognition. For a phone number it is more likely that a vertical line is the number one than a lower case letter L.

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
recognizerContext = recognizer.CreateRecognizerContext();

// Setup the RecognizerContext's Text Context (Word List and factoid)
recognizerContext.Factoid = "(!IS_TELEPHONE_FULLTELEPHONENUMBER)";

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
One of the issues I have encountered in developing applications that utilize Digital Ink is a noticeable degradation of performance that occurs when you trap the stylus (pen) actions in an event handler. Remember that the digitizer has a very high sampling rate. By default some of the events are not even switched on until an event handler is attached. An example is the NewPackets event that fires as the stylus moves across the digitizer.

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
The final big addition to the Tablet SDK is the support that has been added to allow inking online. Inking online is achieved through a slight of hand. First a Windows control needs to be created that can accept Ink (see Listing 3) This control can then be embedded in a Web page, using the Object HTML tag.

<OBJECT id="inkComment" height="200" width="400"
classid="WinInkComment.dll#WinInkComment.InkComment" VIEWASTEXT>

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
The new capabilities of the Tablet PC Edition 2005 and the tools provided in the Platform SDK 1.7 provide us with another small nudge closer to digital paper. Tablet takeup so far has been mostly limited to vertical markets where the advantages can be seen to have immediate business benefit. These vertical markets include health care, real estate, and insurance. The opportunities for Digital Ink within horizontal markets have only been taken up by a few software products, such as Franklin Covey's Tablet Planner and One Note. I believe that in the coming months developer components will become available that utilize the features of the new platform. The new components will lower the entry barriers for development of Tablet applications. I hope to see more Ink-enabled applications in the next year.

More Stories By Dr. Neil Roodyn

Dr. Neil is an independent itinerant consultant, trainer, and author. He travels the world working with software companies. Dr. Neil loves Australia, where he spends the summer enjoying the Sydney lifestyle and helping software development teams get more productive. Dr. Neil spends his other summer each year flying between northern Europe and the USA, working with software teams and writing about his experiences. Neil brings his business and technical skills to the companies he works with to ensure he has happy customers. His latest book, eXtreme .NET, introduces eXtreme Programming Techniques to .NET developers. You can find out more from his Web site www.Roodyn.com.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

IoT & Smart Cities Stories
Moroccanoil®, the global leader in oil-infused beauty, is thrilled to announce the NEW Moroccanoil Color Depositing Masks, a collection of dual-benefit hair masks that deposit pure pigments while providing the treatment benefits of a deep conditioning mask. The collection consists of seven curated shades for commitment-free, beautifully-colored hair that looks and feels healthy.
The textured-hair category is inarguably the hottest in the haircare space today. This has been driven by the proliferation of founder brands started by curly and coily consumers and savvy consumers who increasingly want products specifically for their texture type. This trend is underscored by the latest insights from NaturallyCurly's 2018 TextureTrends report, released today. According to the 2018 TextureTrends Report, more than 80 percent of women with curly and coily hair say they purcha...
The textured-hair category is inarguably the hottest in the haircare space today. This has been driven by the proliferation of founder brands started by curly and coily consumers and savvy consumers who increasingly want products specifically for their texture type. This trend is underscored by the latest insights from NaturallyCurly's 2018 TextureTrends report, released today. According to the 2018 TextureTrends Report, more than 80 percent of women with curly and coily hair say they purcha...
We all love the many benefits of natural plant oils, used as a deap treatment before shampooing, at home or at the beach, but is there an all-in-one solution for everyday intensive nutrition and modern styling?I am passionate about the benefits of natural extracts with tried-and-tested results, which I have used to develop my own brand (lemon for its acid ph, wheat germ for its fortifying action…). I wanted a product which combined caring and styling effects, and which could be used after shampo...
The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected pat...
There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
Druva is the global leader in Cloud Data Protection and Management, delivering the industry's first data management-as-a-service solution that aggregates data from endpoints, servers and cloud applications and leverages the public cloud to offer a single pane of glass to enable data protection, governance and intelligence-dramatically increasing the availability and visibility of business critical information, while reducing the risk, cost and complexity of managing and protecting it. Druva's...
BMC has unmatched experience in IT management, supporting 92 of the Forbes Global 100, and earning recognition as an ITSM Gartner Magic Quadrant Leader for five years running. Our solutions offer speed, agility, and efficiency to tackle business challenges in the areas of service management, automation, operations, and the mainframe.