Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



LearnNow


XAMALOT
 


LearnNow


Reader rating:
Click here to read 1 comment about this article.
Article source: CoDe (2007 - Vol. 4 - Issue 2 - Mobility)


Article Pages:  1  2 - Next >


Exploring Tablet PC Application Deployment

You have decided to take the plunge and create a Microsoft® Windows® XP Tablet PC Edition operating system-aware application. This decision comes with a new set of requirements when it comes to enabling Tablet PC-specific features and deployment of your application. This article will take you through the process of creating a Tablet PC-aware application and deploying it in the enterprise.

"
You may receive an exception if you are on a non-Tablet PC-enabled computer because there are no recognizers installed. You will need a Table PC-enabled OS to support ink recognition.
"

When developing Tablet PC-enabled applications you must take a number things into consideration. Do you create applications specific to just the Tablet PC platform? Do you create a single application that houses “standard” application inputs and then augments that functionality with tablet features where relevant? How do you know if you are running in a Tablet PC-enabled environment? What tools do you need to install to develop these applications? What do you need to do to deploy these applications into the enterprise? This article will address these issues.

The Tools

Visual Studio 2005 developers who want to develop pen-enabled applications don’t have to do a lot more than they’d do to build any application with the .NET Framework. You can develop pen-enabled applications using the following operating systems and toolsets:

Windows Vista™ Premium Editions

Microsoft® Windows® XP Professional (SP2)

Microsoft Windows Server™ 2003

Windows XP Tablet PC Edition 2005

Microsoft Windows 2000 (SP4)

Microsoft Visual Studio® 6.0 (SP5)

Visual Studio .NET (2003 or 2005)

After installing/acquiring the proper operating systems and tools you need to download and install the Tablet PC SDK from the Microsoft Web site.

You can develop and test your applications using any of the above operating systems provided you have the proper tools installed (for a more detailed explanation of development environments for Tablet PC-enabled applications, see Eliot Graff’s article, “The Proper Developer Environments for Mobile PC, Tablet PC, and Ultra-Mobile PC Applications,” found in this issue of CoDe Focus.

The real limitations of your operating systems present themselves when it comes to deployment For instance, Windows XP Professional or Windows 2000 don’t natively support ink recognition. These operating systems can collect ink but there are no default recognizers installed to turn that ink into text. To turn ink into text you will need Windows XP Tablet PC Edition 2005, a Premium edition of Windows Vista, or a copy of Windows XP with Microsoft Windows XP Tablet PC Edition 2005 Recognizer Pack installed (see sidebar, Recognizer Pack).

After installing the Tablet PC SDK you can get to work on pen-enabling your application. This article will use Windows XP Professional and Visual Studio 2005 to create a simple Tablet PC-aware application and then deploy that application to Windows Vista Ultimate and Tablet PC Edition 2005.

Tiny Tablet Application

My small Tablet PC-enabled application has the following requirements:

Capture ink input from the end user

Determine whether the platform supports Tablet PC functionality.

Turn captured ink into text when your operating environment is capable

Determine what recognizers are available to an application

To build this application, do the following:

Create a new Windows application.

Add a reference to the Microsoft.Ink and Microsoft.Ink.Analysis assembles. You can find these assemblies in the following location: “C:\Program Files\Microsoft Tablet PC Platform SDK\Include\Microsoft.Ink.dll”

Add three buttons to your form. Name them cmdRecognize, cmdClear and cmdShowRecognizers respectively. Set the Text property of these buttons to Recognize, Clear, and Show Recognizers, respectively.

Add a Panel control to your form. Name it pnInk.

Add an imports statement referencing Microsoft.Ink assembly to your form.

Add an overlay member variable to your form.

Add the following code to the Load event of your form.

MyCollector = New InkCollector(Me.pnInkHandle)

Add the following code to the Click event of the cmdRecognizeButton.

Dim cString As String = _
Me.MyCollector.Ink.Strokes.ToString
     MessageBox.Show(cString)

Add the following code to the cmdClear button’s Click event.

Me.MyCollector.Ink.DeleteStrokes()
        Me.pnlnk.Invalidate()

Now run your application. Your Panel control should accept ink input. However, when you click the cmdRecognize button you may receive an exception if you’re not on a Tablet PC computer because there are no recognizers installed. You will need a Tablet PC-enabled OS to support ink recognition. The next section will demonstrate how to determine whether Tablet PC features are available to your applications.

Pen Enabled

The first step to building a Tablet PC-aware application is to determine whether or not you are running in a Tablet PC operating environment. You can test whether you are running in a Tablet PC-enabled environment by calling the Windows API GetSystemMetrics function with a value of 86. For example:

Module WindowsAPI
Private Declare Auto Function 
  GetSystemMetrics Lib "user32" _
  (ByVal value As IntegerAs Integer

  Private Const SM_TABLETPC As Integer = 86

Public Function IsTablet() As Boolean

 Dim lnTestValue As Integer = _
    GetSystemMetrics(SM_TABLETPC)
 Return lnTestValue 0

  End Function
End Module

When executed from a Tablet PC 2005 environment this function always returns true. Windows Vista Premium environments have a different set of requirements when determining Tablet PC capabilities. Windows Vista Premium editions will only return true if a number of preconditions are met:

A digitizer or pen device is installed on the machine

The version of Windows Vista must be licensed for Tablet and Touch features (i.e. a premium version of Vista)

During my development I found something strange. All of the features of my application worked on Windows Vista Ultimate even though the GetSystemMetric call I made returned false. I had forgotten to install my digitizer on my desktop machine. I decided to use this inconsistency to my advantage.

I determined that another mechanism for determining whether or not your computer has Tablet PC features installed is to see if there are any Recognizers installed. Recognizers are the APIs that Tablet PC-enabled operating systems use to turn ink into text. Tablet PC-enabled operating systems include a number of these recognizers.

On my Windows Vista machine, I knew that the Tablet PC features were installed but the GetSystemMetrics function always returned false. I used the Recognizers collection to determine whether my machine was actually tablet-aware.

In the previous section I pointed out that your application would blow up if you ran the code on a machine lacking Tablet PC features (i.e. recognizers). I changed my recognize code to look for any recognizers installed on the machine.

Dim recognizers As Recognizers = New Recognizers()
If recognizers.Count Then
  Dim cString As String = _
    Me.MyCollector.Ink.Strokes.ToString
  MessageBox.Show(cString)
Else
   MessageBox.Show("No recognizers installed")
End If

Note: Standard editions of Windows Vista have a single recognizer installed on them (gesture recognition) so you may want to change the count you test for to > 1.

You can now complete the final requirement of the application requirements listed earlier. The application will determine what recognizers are installed in the operating system. The following code lists the recognizers installed on your Tablet PC.

Dim recognizers As Recognizers = New Recognizers()
If recognizers.Count Then
   For Each oReco As Recognizer In recognizers
       MessageBox.Show(oReco.ToString)
   Next
Else
    MessageBox.Show("No recognizers installed")
End If

The last two examples illustrate enabling Tablet PC features even when the operating system returns a value that might not be true.

If you want to make sure that you can take advantage all Table PC features you could use a strict approach and only enable features when the IsTablet() you created earlier, returns true. Otherwise you can use a less stringent check like the one in the prior snippets.

&

By: Rod Paddock

Rod Paddock is the editor of CoDe Magazine. Rod has been a software developer for more than 10 years and has worked with tools like Visual Studio .NET SQL Server, Visual Basic, Visual FoxPro, Delphi and numerous others.

Rod is president of Dash Point Software, Inc. Dash Point is an award winning software development firm that specializes in developing applications for small to large businesses. Dash Point has delivered applications for numerous corporations like: Six Flags, First Premier Bank, Intel, Microsoft and the US Coast Guard.

Rod is also VP of Development for SQL Server tools maker, Red Matrix Technologies. (www.redmatrix.com).

Fast Facts

Developing and deploying Tablet PC-enabled applications have a number of unique aspects. This article delves into both of these topics.


The Tablet PC SDK 1.7

You can find the Tablet PC SDK at:

http://www.microsoft.com/downloads/details.aspx?FamilyID=69640b5c-0ee9-421e-8d5c-d40debee36c2&;displaylang=en


Recognizer Pack

If you want to convert handwriting from digital ink to text, in multiple languages, download the Windows XP Tablet PC Edition 2005 Recognizer Pack:

http://msdn2.microsoft.com/en-us/library/aa813362.aspx



Article Pages:  1  2 - Next Page: 'Deploying Your Applications' >>

Page 1: Exploring Tablet PC Application Deployment
Page 2: Deploying Your Applications

How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
3.4 out of 5

17 people have rated this article.

TOWER 48

      LearnNow

 

LearnNow