What's different in Windows Mobile

Top  Previous  Next

Windows has been designed to be similar to the desktop operating system, even though, it’s a completely different operating system.


It’s challenging because it’s unfamiliar. As a developer who is starting out with mobile devices, it’s hard to do things because everything the developer is used to seems to be ‘missing’. Even the OS does things differently. A good example is the file system: no drive letters, no relative paths - what a shocker for seasoned Windows developers! - Ilya Tumanov


The difference starts with the way you use these devices. A computer is device you boot, a laptop a device you resume and a mobile device something you turn on. On desktop systems you run an application, work with it and then close it. On a mobile system you pick a function from a menu. On desktops you arrange windows on one or more monitors. With most Windows Mobile devices you have one screen showing one application.


This has implications on application development. Windows Mobile normally doesn’t shut down applications even if you close them. Applications keep running and are minimized when not in use. When memory goes down, Windows automatically terminates applications in the background to recover memory.


The user interface is another challenge. Not only is the screen usually much smaller than on the desktop, there are also various sizes and orientations in use on mobile devices. Depending on the operating system and the CE build, additional elements are placed at different locations. In one version, the menu bar might be at the top, in others it’s at the bottom. The same applies to tabs on a pageframe that are on the top on some systems and at the bottom for others.


Widely different resolution resulted in the creation of Hi-Res aware applications. Some devices have 480x640 (PDAs are usually vertical) instead of 240x320 as the resolution with the same screen size. By default, mobile devices should simply scale up and draw each pixel as a 2x2 square. This way, non resolution aware applications look the same on these new devices whereas more recent application can display sharper images.


Unfortunately this detection doesn’t always work flawlessly. Therefore Guineu offers manually scaling with the SYS(8006) function. By default, Guineu.Compact.EXE is a resolution aware application, whereas any application compiled within the VFP IDE is not resolution aware.


Text can be entered by different means. User can display a virtual keyboard, or use Transcriber to write text anywhere on the display, or use an attached keyboard which might only consists of numeric keys. As a developer you don’t have to care that much about the input method. All input reaches your application through the KeyPress event. Text is automatically inserted into textboxes and editboxes.


Mouse input is typically handled via a stylus. Instead of the action pair of moving the mouse and then clicking, you only have one action: tapping. Once you touch the screen with a stylus, you produce a click event. UIs that rely on users moving the mouse won’t work, such as tooltips.


The file system on windows mobile devices is closer to the Linux system than to Windows. There are no drive letters. Everything starts from the “\” directory. All devices are mapped into the directory tree as folders. A compact memory card, for instance, is accessible as “\Storage Card”.


The system also doesn’t support the concept of a current system. On Windows Mobile you always have to work with absolute paths. Guineu makes this a little easier by simulating a current directory for your code. This ways you can still write


USE data\customers.dbf


In your code no matter in which directory your application is stored. By default the current directory is the same as the application directory. To change it you can use CD just like on the desktop.