The Tablet PC

This book is based on developing applications for the newly released Tablet PC using Visual Basic® .NET™. In this chapter, we focus on the specifics of the Tablet PC, including what makes a Tablet PC unique and how this affects the development process. In subsequent chapters, we learn about general VB .NET development, and after building a solid foundation, we focus on developing applications specific to a Tablet PC. In doing so, we take advantage of the Tablet PC hardware, which brings us to the first concept-the requirements of a Tablet PC.

What Is a Tablet PC?

As we create applications for the Tablet PC, we will encounter many things that are already common to you, such as hard drive storage, memory restrictions, and a display. However, there are many things that are specific to a Tablet PC, and we need to keep them in mind as we develop applications. Some of the hardware specifications enable us to create applications that will take advantage of the new technologies. At the same time, we also have to deal with some of its limiting factors. Keeping track of both is imperative to a Tablet PC project.

First, a Tablet PC has many of the same hardware and functions that are available on a regular desktop or notebook PC. It runs what is essentially Windows® XP as an operating system, which allows the vast amount of existing Windows® XP-based applications to be used. Common programs, such as Microsoft Word and Excel, work very well on a Tablet PC, as do most applications that work on Windows XP-based systems.

Because many of the features and concepts are identical, it might benefit us to look at three devices that detail what a Tablet PC is not. A Tablet PC is not a:

Now that we know what a Tablet PC is not, we can more easily look at what makes a Tablet PC. These are typically the ideas that make up a Tablet PC and separate it from any of the other devices we have mentioned:

To summarize for our needs, a Tablet PC is a small and multipurpose computing device that uses a pen (or stylus) for input and runs Windows XP Tablet PC Edition.

Important Concepts for Tablet PC Development

Now that you know, at least by a simple definition, what makes a Tablet PC unique, we'll take a look at how its features are implemented. We look at the Tablet PC Input Panel, digital ink, and the digitizer/screen. More importantly, we look at how they affect a development project.

Tablet PC Input Panel

The Tablet PC Input Panel (see Figures 1.1 to 1.3) is the general method for speech and pen input for a Tablet PC. If you use a Tablet PC with standard applications, you will soon realize that it is indispensable. This is not to say that a developer writing new applications should rely on the Input Panel as a method of input or as a crutch to be sloppy with a design. You would, however, be advised to borrow ideas from it, such as its size in relation to the total available screen and its ability to hide from view until needed. Think of the Input Panel as it was intended-a general input area and not as a way to enter data into an application specifically designed for a Tablet PC.

1.1 to 1.3: The Tablet PC Input Panel in various states.

Digital Ink and the Digitizer

The digital ink used in Windows XP Tablet PC Edition seems to be a very obvious thing to mention, but there is more to the ink than an image file. Instead, the ink is stored as a series of mathematical equations, known as Bezier curves. This allows the file sizes needed to store digital ink to be small and very efficient. Tablet PCs utilize an electromagnetic digitizer, which accepts input from a stylus that contains an electromagnetic coil. Although the digitizing process is very technical, it can be summed up in the following steps:

  1. The operating system (OS) captures pen motion coordinates and renders it as ink.
  2. The pen strokes are sent to a recognizer.
  3. The OS displays an interpretation of writing.

      Note 

    There is a great deal of technical information that could be presented on this topic, but because the information is not really necessary for development purposes, we won't go into it in any detail. The Microsoft Web site, as well as Web sites from hardware manufacturers, contains more detailed information about the hardware and technical aspects of the digitizer.

While we're discussing the digitizer, it seems like a good idea to also look at the screen and how it affects development. Because much of the input of an end user is pen-based, it is imperative to consider this as you design an application. Although writing on the screen seems fairly intuitive and natural, the process can cause some difficulty for the user. For example, one very big problem is the way menus are displayed when they are pressed with a pen. To explain this, refer to Figure 1.4, which displays a mouse pointer choosing a menu item in Microsoft Word. If you look closely at the text, you can see that this is the Insert menu as I'm editing this chapter inside Word. Clicking on the menu doesn't cause any problems as the small mouse pointer is the only thing in the way. Now, look at Figure 1.5. This displays the same menu as it would appear to a right-handed user clicking on it with a pen. You can see that most, if not all, of the menu is hidden by the user's own hand.

Figure 1.4: A menu being selected with a mouse.

Figure 1.5: The same menu being selected by a pen is hidden by a hand.

Many times, as an end user, you can move your hand to the side to view the information that is being displayed in a hidden menu. There are times, however, when this is not practical, and in general, needing to constantly move to view items can cause considerable delays and frustrations for an application user. There are also times when moving just won't work, such as a ToolTip, which requires the mouse pointer to be in a particular location in order for the ToolTip to be displayed. Further compounding this problem is the fact that some users are also left-handed. This is a problem that should be remembered, but unfortunately, you will never completely avoid it. That being said, Microsoft has given us the ability to set up the handedness of the end user. This allows the user to position their menus away from the pen. You can set this in the Tablet PC Control Panel (see Figure 1.6). When you click the Tablet and Pen Settings icon, you will see the Tablet and Pen Settings window displayed, as shown in Figure 1.7. This is where you can select the handedness settings.

Figure 1.6: The Tablet PC Control Panel.

Figure 1.7: Settings for the pen.

  Note 

The handedness settings only affect ToolTips and standard menus. If an application has been developed with a custom menu, it will not work with these settings.

An additional consideration related to the Tablet PC screen is that the screens support both landscape and portrait modes. You will need to allow your interface to change as the screen changes so that the end user can use both modes. Generally speaking, if your application is going to be mostly pen-based, it is probably safe to assume that the user will use their Tablet PC in portrait mode, like a sheet of paper. This is not completely accurate though, so you should do your best to allow both modes.

Types of Ink

Among the most important things you'll have to decide for a pen-enabled application is how you will use the ink in your application. That is, will the ink be used simply as ink, such as the writing on a piece of paper, or will it be converted or changed in some other way? In other words, are you planning to capture the ink as handwriting, or are you going to convert it to text, graphics, or manipulate it in another manner? Determining which type of ink you need is dependent on the type of application you are going to design.

Pen Interactions

Another key ingredient for a Tablet PC is to determine the way in which the pen will interact with your application. There are a few common tasks that a pen can do:

Hover: The pen stays within the detection range of the digitizer but does not actually touch the screen. This is similar to a standard mouse moving on the screen and the traditional mouse arrow also moving to indicate this.

Tap: If you touch the pen and then quickly lift it from the screen, it is a tap. This is the same as a left-click of a mouse and is treated as such in Windows applications.

Double tap: Tapping the pen twice in quick succession is called a double tap. This is the same as double-clicking a mouse.

Press-and-hold: Touch the pen on the screen and hold it in a single location for a few seconds. This functions as a right-click of a mouse when you lift it from the screen.

Hold-through: The press-and-hold goes hand in hand with the hold-through action. If you continue to hold the pen down even longer than the requirement for the press-and-hold, instead of getting a right-click action, you get the same action as holding down the left mouse button.

Drag: Touch the screen with the pen, and while holding down, move a distance on the screen, eventually lifting the pen from the screen. This is the same as dragging a mouse.

Hold-drag: Similar to a drag, you can do a press-and-hold and then drag to simulate a right-mouse-button drag.

Gesture: A gesture is a unique method of input with a pen. By drawing a certain pattern, the Tablet PC recognizes it and performs an action based on it. Gestures can be used for a variety of common actions or commands similar to a keyboard shortcut.

Summary

In this chapter, we covered the basics of the Tablet PC. We began by comparing its features to those of other computing devices and came up with a simple definition for a Tablet PC. Next, we briefly looked at how the Tablet PC can affect the development of an application. In the next chapter, Introduction to Visual Basic .NET, we begin to look at Visual Basic .NET, the language which is used in this book. We spend several chapters covering the basics of VB .NET and return to specifics related to the Tablet PC in Chapter 12, Obtaining the Tablet PC SDK. If you have experience with VB .NET, you can quickly skim these chapters. Otherwise, these chapters lay a good foundation that you can use to build Tablet PC applications.

Категории