Building Tablet PC Applications (Pro-Developer)

A Beautiful Day

There s something about the heat of the moment that makes it easy to forget the bigger picture. In the fall of 2001, Rob and I were both on the Microsoft Tablet PC team, heavily involved in locking down the fourth development milestone. Bugs were coming in every day, and developers were fixing them as efficiently as possible. Everyone was working, head down, on his component.

One day I took a step back from all the excitement and realized that although the Tablet PC team was creating a brand-new software platform for developers, there would be no books to explore such a platform in depth when it became available. Developing software for Tablet PCs is unlike developing software for any other platform. Pen computing, in general, is a new area for most developers. The pen introduces a host of usability concerns that many developers are not aware of. And then there s the issue of the completely new APIs.

So I approached Rob about coauthoring a book specifically written to address tablet application design as well as the new APIs. He agreed, believing as I did that the success of the Tablet PC Platform lay in the development of great software. What you are now holding is the result of that day s conversation and many months collaboration between Rob, me, and a host of our supporters.

Rob and I work in the Tablet PC division at Microsoft, but we were not part of the team that created the Tablet PC Platform SDK. Instead, we were responsible for integrating the Tablet PC Platform SDK technologies into Microsoft Windows XP Tablet PC Edition (specifically Windows Journal). Our situation gives us the best of outsider and insider experiences: as outsiders using the Tablet PC Platform SDK technologies, we share the perspective of third-party developers like you; but as insiders on the Tablet PC team, we understand many of the reasons behind the design of the SDK. We ll share our experiences with you throughout this book.

Target Audience

We designed this book for developers, who write code to implement designs, and designers, who write specifications or lay out user interfaces for developers. In many cases, developer and designer are the same person.

Developers will get the most benefit from this book if they have working knowledge of UI development in the Microsoft .NET Framework. We venture only briefly into other parts of the .NET Framework when necessary. Because we kept the focus of the technical chapters on the Tablet PC Platform APIs, even a developer who is new to the .NET Framework should find it easy to follow along.

Sample Code

Throughout this book, we present code samples in C#. Those of you who don t know C# but are familiar with C++ or Java should find the samples easy to understand. Developers and designers familiar with Microsoft Visual Basic .NET will find very few differences between the C# implementations and their Visual Basic .NET counterparts. We have, however, stayed away from presenting samples in C++/COM to keep the code samples clear and concise. If you want to write your tablet application in C++/COM, you ll be happy to know that the .NET interfaces of the Tablet PC Platform APIs are similar to the C++/COM interfaces.

NOTETo keep the samples in this book as concise as possible, they were written Petzold style, that is to say, without the use of the designers in Microsoft Visual Studio .NET.

Another great source of samples is the Tablet PC Developer Web site (http://www.tabletpcdeveloper.com). Developers from around the world are free to contribute code to this Web site, which aims to provide solid samples of Tablet PC applications and solutions to developers. If you have a question or need a particular sample, you should make this your first stop on the Web for Tablet PC software solutions.

The Companion CD-ROM

This book s companion CD-ROM has been carefully formulated to enhance your Tablet PC software development experience. Here s where to find everything you need on the CD-ROM:

Using the Companion CD-ROM Samples

Using the SDK, you can compile, run, and modify the samples included on the companion CD-ROM. You can use, modify, and redistribute the samples in this book, in part or in whole, free of charge and restriction. Although great effort has been taken to ensure that these samples are safe for general consumption, they are provided as is, with no warranty expressed or implied as to their usefulness in any particular application. The samples are not designed for and may not be used with any life-sustaining or health-monitoring software. In addition, the samples may not be modified and used to disparage Rob, myself, or either of our mothers.

NOTEThe Tablet PC Platform SDK must be installed before the book samples will compile or run.

Each sample referenced in the book is contained within its own directory under the main Samples directory on the companion CD-ROM. Standard Microsoft Visual Studio .NET solution files (.SLN) and project files (.CSPROJ) are included for your convenience. In addition, a solution file in each chapter folder contains all the projects in that particular chapter. The default settings included in the solutions should be adequate. However, you might need to adjust a few settings in the samples solution files if your development environment or SDK installation is different from the default configuration.

System Requirements

Following are the system requirements for building and running the samples included with this book. Some of the samples in this book require ink recognition capabilities, which are available only on Windows XP Tablet PC Edition.

Software

Hardware

Категории