Blue Theme Orange Theme Green Theme Red Theme
 
MindFusion's Components
Home | Forums | Videos | Photos | Blogs | E-Books | Interviews | Jobs | Beginners | Training
 | Consulting  
Submit an Article 
 Login Close
User Id:
Password:
 
Forgot Password
Forgot Username
Why Register
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
LeftbarAd
 Resources  
Close
 Our Network  
Close
Search :       Advanced Search »
Home » XML .NET » Flexible keyboard control for mobile applications

Flexible keyboard control for mobile applications

This article describes you how to create a customizable keyboard control by using Resco mobile forms toolkit.

Technologies: .NET 2.0, Mobile Internet Toolkit, Visual Studio 2008, XML,Visual C# .NET
Total downloads :
Total page views :  1899
Rating :
 1/5
This article has been rated :  1 times
   Print Read/Post comments Post a comment  Rate  
   Email to a friend  Bookmark  Similar Articles  Author's other articles  
 
ArticleAd
Become a Sponsor




Typing the data into a pocket pc application is important but often very uncomfortable. Using the soft input panel is awkward. Hardware keyboard can help, but it is not always present and because of its generality it doesn't fit the purpose of the application. Creating a useful and good looking keyboard layout is a piece of art. With Resco Custom Keyboard for .NET CF it is simple to create a keyboard layout that looks even like this:



Figure 1.

What is Resco Custom Keyboard for .NET CF ?

Resco Custom Keyboard for .NET CF is a .NET Compact Framework control which serves as a fully functional and customizable keyboard. Customization can be done using Visual Studio's designer. The most important and absolutely unique feature of Custom Keyboard is that developer can design as many keyboard layouts as he needs and then switch among them during run-time. It is also possible to save the created layouts into an XML file and then load the layouts anytime into it during run-time. The developer can change the whole set of keyboard layouts if particular action takes place (such as the user changes the language of the application).

How does it work ?

Custom Keyboard maintains a collection of Layout objects. Each Layout object represents a keyboard layout. A keyboard layout consists of Key Descriptor objects. There are two different approaches when designing a keyboard layout.

Approach I


The developer can create a keyboard layout and add it to the collection. He can assign a unique name for each layout. He can also specify the width and height of the layout. The layout contains a collection of keys. Each key contains Bounds property which defines its position within the layout. Such layout:



Figure 2

can easily be created just using Visual Studio's designer. It automatically generates code which describes the created layout. This is how the layout looks like in Visual Studio's designer:



Figure 3

The color of the pressed key can also be defined. The key is painted that color as long as it is being pressed.

The Key Descriptor object contains many properties which define the way the key is painted. The layout designer can therefore easily achieve the following layout in which particular keys are highlighted:



Figure 4

For example the developer can highlight those keys which are most likely to be pressed while the user is typing.

Custom Keyboard also supports function keys (for example shift key). Creating a function key is as simple as adding a key to the collection and setting its IsFunctionKey property to true.

To create a shift key functionality developer needs two different keyboard layouts. One which will be used when the shift key is pressed and one when it is not. In the Keyboard Key Up event handler, he just needs to activate the other layout by setting Custom Keyboard's Active Layout Index property to appropriate value.

Approach II

The second approach of keyboard's layout design is to use a bitmap coating or a so-called "skin". Custom Key board then displays the skin atop of its client area. This approach provides the developer unlimited possibilities of customization, because he can use any kind of graphics in the skin.

The layout consists of two bitmap images - one that is used when the button is pressed and one when it is not. Let's say that you are creating an application which serves as an electronic survey where the user has to enter the kind of transportation he likes the most. The developer can use the Custom Keyboard and create these 2 skins for it:

  

Figure 5

The second one will be used when a button is pressed. Of course, for the Custom Keyboard to work properly, the user has to define the regions of the skin which represent the buttons. For this purpose, Custom Keyboard can be switched into Debug Mode as shown on the following image:

 

Figure 6

Now while a button is being pressed, the region of that button will be painted using the darker skin:

 

Figure 7

Conclusion

Resco Custom Keyboard for .NET CF is a very flexible and customizable keyboard control for .NET Compact Framework developers. It can be used in various types of mobile business applications. Field service applications, where the user has to type in specific information such as values obtained by measuring. Even in conditions where users are forced to wear gloves the keyboard can be still easily operated, if the layout was designed carefully enough.

Together with its unique capability which allows the developer to change the layout anytime during run-time, it provides a useful and customizable user interface for purpose of all kinds of mobile business applications.

Availability

Resco Custom Keyboard for .NET CF is part of Resco Mobile Forms Toolkit, which is a suite of Visual Studio controls designed specifically for mobile devices. More information about this popular toolset can be found here.
 


Login to add your contents and source code to this article
 [Top] Rate this article
 About the author
 
Vladimir Gregor
I have over 2 years experience in IT industry. I hold a bachelor degree in Computer Systems and Networking. I am responsible for marketing at Resco and product management.
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Boost the performance of your .NET applications
“ANTS Profiler took us straight to the specific areas of our code which were the cause of our performance issues." Terry Phillips, Sr. Developer, Harley-Davidson Dealer Systems. Download your free trial of ANTS Profiler.
Go.NET
Build custom interactive diagrams, network, workflow editors, flowcharts, or software design tools. Includes many predefined kinds of nodes, links, and basic shapes. Supports layers, scrolling, zooming, selection, drag-and-drop, clipboard, in-place editing, tooltips, grids, printing, overview window, palette. 100% implemented in C# as a managed .NET Control. Document/View/Tool architecture with many properties&events. Optional automatic layout.
Dundas Software
Dundas Chart for .NET is the most advanced .NET charting package available today.  With an extremely complete feature set, elegant architecture and easy implementation, Dundas Chart can quickly add advanced Charting functionality to enhance and transform ASP.NET and Windows Forms applications.  Whether you are implementing charting into internal projects, or building applications for clients, Dundas Chart offers advanced technology and advanced results to get the most out of data.
 
   Print Read/Post comments Post a comment  Rate  
   Email to a friend  Bookmark  Similar Articles  Author's other articles  
 
 Post a Feedback, Comment, or Question about this article
Subject:  
Comment:  
ArticleAd
Become a Sponsor
Latest Comments:
Subject Posted By Posted On

 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Suggest an Idea  |  Media Kit
Current Version: 5.2009.6.2
 © 1999 - 2009  Mindcracker LLC. All Rights Reserved