DEVBUZZ Homepage It’s Great to be Us…Developers by Carl Davis
 
Web www.devbuzz.com
  HOME PAGE
  All Articles
  Advertise
  Consulting

 Development
  Discuss - Forums
  Still in the box?
  .Compact Framework
  Code Snippets
  SQL Server CE
  Database
  MS Resources
 Stores
  Developer Controls
  Pocket PC Hardware
  Pocket PC Software
  Pocket PC Books
  .NET CF Books
  Book Reviews
  SPB SW Discounts
  RESCO SW Discounts
 DEVBUZZ Info
  About Us
  Help
  Join our email list
  Links & Ratings
  Press & Comments
  Pocket PC version
  Software Reviews
  Hardware Reviews
 Authors
  Authors
  Article Guide
  Competitions
 Resources
  Developers
  Register
  Login

  SPB Discounts!
 Columnists
  Rick Winscot
 Past Blast
  Personal Media Ctr
  Gizmobility
  eVB Legacy
  Old news
  Hosted Software
  Wireless
  Newsletters
  Carl Davis
  Upton Au

 Pocket PC Registry
  Join the registry
  View current list
 Current Poll
Are you converting to .NET Compact Framework?
Yes, it has changed my life!
No, I'm sticking with eVB
.NET CF what's that`?

Current results
3431 votes so far
 Recent Forum Threads [goto forums]

Get Computername
read... (67 hits)


Great aid to development productivity
read... (82 hits)


ThreadingTimer sample code
read... (143 hits)


Multithreading with .NET CF
read... (194 hits)


Moving from eMbedded Visual Basic to Visual Basic .NET
read... (166 hits)


.NET Compact Framework 2.0 Service Pack 2
read... (226 hits)


Transfer Data from SQL Server 2000 to SQL Server Compact Edition
read... (298 hits)


This protocol version is not supported
read... (236 hits)


Converting Lowercase to uppercase wont work
read... (203 hits)


Direct access to MS SQL Server 2000
read... (374 hits)


Creating SDF file in Desktop
read... (513 hits)


Winsock in CF.NET
read... (316 hits)


Using Pocket Outlook to submit HTML page form with MAILTO action
read... (420 hits)


Missing file "System.Data.PocketPC.asmmeta.dll"
read... (268 hits)


HP iPAQ hw6915 Serial Port Issue
read... (309 hits)


Info on the recent forum changes
read... (341 hits)


SqlServer tools from Redgate
read... (383 hits)


Arrow keys and Hardware navigation button
read... (393 hits)


O2 XDA lls pin sync cable to comport
read... (322 hits)


Creating dynamic folders on Pocket PC OS
read... (299 hits)

Custom Windows Mobile software development.
LBS Challenge 2007
LBS Challenge Eight previous NAVTEQ Global LBS Challenge® participants have received venture capital funding and nine past LBS Challenge winners have launched commercial applications on major wireless carriers. Register your non-commercial LBS application in the 2007 NAVTEQ Global LBS Challenge in one of three regions: Americas, Europe-Middle East-Africa (EMEA) or Asia-Pacific(APAC). You could win a share of $2 million in prizes. This could be your year.
Dream. Develop. Win.

The Pocket Commando by Carl Davis | Back

It’s Great to be Us…Developers by Carl Davis
Written by Carl Davis  [author's bio]  [read 20015 times]
Edited by Derek

Download the code   Discuss this article   Windows CE 3.0   

Page 1  Page 2 

A few days ago I was using an application that had a number of popup messages to convey status and what was occurring with the system. I began thinking how much they seemed to get in the way as I tapped "OK" to dispose of each. It started me thinking on how efficient designs differs between desktop machines and handhelds. Receiving popup messages was natural on the desktop, but I am less forgiving on my handheld.

The next thought I had was it's great to be a developer. If you don't like how software works, you can make your own that solves the problem. Now I realize that this isn't always the case, but it's this very challenge that gets your blood flowing in the morning. So I started thinking about a couple of things that I wanted to improve in my PocketPC experience. Although there are a number of thoughts, I wanted to share two of them this time. The first is a recommendation on placing controls on your forms and layouts. The second is an improved popup information box that automatically disappears.

Pitching Low and Outside…

On your typical desk-based and web-based applications, navigation and controls are placed as far up and to the left as possible (I'll call this "high and inside" in honor of the new baseball season). For example, most web page's menu and button bars go across the top of the window and links to major sections are found on the left-hand side.

This technique works well for desktop applications, because a user's natural reading direction flows from top to bottom, left to right. This doesn't work nearly as well on the PocketPC platform. As you tap on the screen (for right-hand users) your hand will obscures the information being displayed.

Just as other professions, developers can get into a rut. We get use to building things in a particular way and don't really question whether it's the best. I was playing some games with a friend of mine and was using a dice rolling utility I created (see Figure1). I realized I had designed the application using the "high and inside" layout and each time I tapped to generate a roll, I needed to move my hand to see the result. I'm currently redesigning the application to focus on this aspect. I'll put the controls low and to the right or "Low and Outside" on the screen. Fortunately, Microsoft has done a lot of this work for us already with menus and tabs designed with this in mind already.

Some of the guidelines I've started using include:

  • Keep controls that are interacted with and modify content "Low and Outside".
  • The only controls that should appear at the top of the display are column headers that allow sorting changes or can drop down to show more options (e.g. File Explorer's directory selection)
  • The most important information for the user should follow the "high and inside" rule. I also like the idea of minimizing scrolling and try to minimize my use of scrolling forms.

Although none of this information would fall into the category of sophistication found in aeronautical engineering of solid fuel propulsion systems (i.e. rocket science), I've seen numerous applications fall into this trap.

"A Tap Saved is a Second Earned"

Let me get right to the point, popup message boxes are some of the most annoying user interface elements found on the PocketPC. Of course, they're necessary to draw a user's attention to a important piece of information, or allow them to acknowledge a change they're about to make, but constantly selecting "OK" gets pretty old quickly. It would be wonderful if messages like "Save Completed" would disappear without telling them to and save me a couple of taps in the process!

So I put my developer hat on and went about creating an eVB message box that would automatically disappear after a short period of time. I wanted to create a popup message box that wouldn't require the user to click on "OK", but would give the user the final say whether to enable this feature or not. I also wanted to allow the user to change their mind and tap on the message box to keep it from disappearing.

The user interface for my message box is found in Figure 2.

The key elements in our new message box are a Label to display our text and a checkbox to allow the user to enable auto-hiding. To implement the message box, I created another form in my project. This allows me to do some basic encapsulation of functionality. For completeness, I created a simple API where a programmer can setup some properties beforehand or can call some mutator procedures to setup information. Listing 1 shows the two methods for calling our new message box.

Listing 1

' Use properties to setup message box
Private Sub Command1_Click()
Form2.DisplayTime = CInt(Text2.Text)
Form2.Text = Text1.Text
Form2.Caption = Text4.Text
Form2.Display
End Sub

' Use methods to setup message box
Private Sub Command2_Click()
Form2.SetAutoHide (False)
Form2.SetDisplayText (Text1.Text)
Form2.SetTimerLength (CInt(Text2.Text))
Form2.SetWindowCaption (Text4.Text)
Form2.Display
End Sub

The code for the message box is very simple. We use a Timer control to trigger hiding the display when the defined number of milliseconds elapses. Managing this configuration is handled by a couple of simple helper procedures (EnableAutoHide, DisableAutoHide). Enabling auto-hiding consists of enabling the timer, checking the checkbox, and setting the autohide Boolean value. Listing 2 shows the code that supports auto-hiding.

Next Page 

Back to the Pocket Commando | [Article Index]

 

Back to the top of the page.
Chris De Herrera's Windows CE Website Windows CE News & Information Source
Copyright ©2000-2007 by DEVBUZZ.COM, Inc., NJ. USA.MSDEVELOP