Browse DevX
Sign up for e-mail newsletters from DevX


Put Your Apps on the Landscape with Windows Mobile 2003 Second Edition

New mobile devices on store shelves all over the world are built to accommodate both landscape and portrait screen orientation and the good news is that the second edition of Windows Mobile 2003 supports this flexibility. The bad news is that it's not just yet a straightforward process, but we'll show you how to get the job done.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

icrosoft recently unveiled the Windows Mobile 2003 Second Edition, which supports different screen orientations and higher resolution display for mobile devices. The new screen orientation capability means you can view your Pocket PC either in Portrait or Landscape mode. Landscape mode is particularly useful for Web browsing, where pages generally display better in a wide-format perspective.

Despite the new updated platform, there is no accompanying new Pocket PC SDK that allows you to take advantage of the new features of the platform. The good news is that you can use some techniques in the .NET Compact Framework to do this instead, and I'll discuss those techniques in this article.

What You Need
  • Microsoft Visual Studio .NET 2003
  • Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC

Jumping Ahead
I'll begin demonstrating how to build screen-aware applications in a moment, but first you should know that when you install the .NET Compact Framework (or deploy/debug an application from Visual Studio .NET 2003) for the first time, you will see an error message (see Figure 1).

Figure 1. Initial Error: This is the error message you'll get when you install the .NET Compact Framework for the first time.

This is no cause for concern. Basically, any application that was not built using the latest Pocket PC 2003 Second Edition SDK (which basically means all applications, at the moment, by the way) will be deemed to be not "screen orientation-aware" and thus not able to display correctly in landscape mode.

This error message will also be shown once when an application is installed. Before you deploy any new application using the new functionality, you'll want to disable the error message. To prevent this error message from displaying when the user installs your application, locate the .inf file in your application's obj\Release folder and set the BuildMax value to one of the following:




Application supports square screens (240x240 pixels).


Application supports screen rotation.


Application supports square screens and screen rotation.

For example, if my application supports both square screens and screen rotation, I will add the appropriate BuildMax value to my .inf file:

... [CEDevice] VersionMin=3.00 VersionMax=4.99 BuildMax=0xE0000000 ...

Once the changes are made, rebuild the CAB files.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date