RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Cruising the Interstate with Windows Mobile 6 Development : Page 2

One benefit of choosing Microsoft technologies for your mobile apps is an integrated, streamlined development process. Find out how easy it is with this tutorial on the basics of developing Windows Mobile apps with the the .NET Compact Framework.

Developing Your Application
The easiest way to start developing for the Windows Mobile platform is to use Microsoft .NET Compact Framework (henceforth referred to as the .NET CF). .NET CF is a scaled-down version of the .NET Framework and is designed to work on Windows CE-based devices (in turn, Windows CE is a scaled-down version of the Windows OS, supporting a subset of the Win32 APIs). .NET CF contains a subset of the class libraries available on the desktop version of .NET Framework and includes a few new libraries designed specifically to work on mobile devices.

At the time of writing, the latest version of .NET CF is version 3.5. Table 2 shows the various version names of .NET CF and their corresponding version numbers.

Table 2. Versions of .NET CF (table adapted from Wikipedia)

Version Name

Version Number

1.0 RTM


1.0 SP1


1.0 SP2


1.0 SP3


2.0 RTM


2.0 SP1


2.0 SP2


3.5 Beta 1


3.5 Beta 2


3.5 RTM


As a developer, you can use either the C# or VB.NET language to write applications for the Windows Mobile platform. All the functionalities required by your applications can be satisfied by:

Figure 4. .NET CF Versions: The versions of the .NET CF installed on an device/emulator.

  • The class libraries in .NET CF, and/or
  • APIs at the OS level via Platform Invoke (P/Invoke), and/or
  • Alternative third-party class libraries, such as the OpenNetCF's Smart Device Extension (SDE).
You can determine the versions of .NET Compact Framework currently installed on your Windows Mobile device by going to Start—>File Explorer and launching the cgacutil.exe utility located in \Windows.

Figure 4 shows the version of .NET CF installed on a Windows Mobile emulator (more on this later).

Windows Mobile 5.0 devices come with .NET CF 1.0 preinstalled in ROM, while the newer Windows Mobile 6 devices come with .NET CF 2.0 preinstalled in ROM. If your application uses the newer .NET CF v3.5, you'll need to install it on the device before the application can execute.

Obtaining the Different SDKs and Tools
To develop Windows Mobile applications using .NET CF, you need to download the SDK for each platform. Here are some of the SDKs you'll need:

The best way to develop Windows Mobile applications using .NET CF is to use the Visual Studio IDE. Use one of the following versions:
  • Visual Studio 2005 Professional or above
  • Visual Studio 2008 Professional or above
If you're using Visual Studio 2005, you need to download the Windows Mobile 5.0 SDK for Pocket PC and Smartphone (as described above). If you're using Visual Studio 2008, the Windows Mobile 5.0 SDKs for Pocket PC and Smartphone are already installed by default. For both versions, you'll need to download the Windows Mobile 6 SDKs to develop applications for Windows Mobile 6 devices.

Figure 5. Design Environment: The important sections in Visual Studio 2008.

With the relevant SDKs installed, the first step is to launch Visual studio 2008 and create a new project. Select the Smart Device project type and then select the Smart Device Project template. Name the project WindowsMobileApp.

In the dialog that pops up, you will be able to select the target platform as well as the version of .NET CF you want to use. Select the Windows Mobile 6 Professional SDK and .NET Compact Framework Version 3.5 and click OK.

Figure 5 shows the various windows in Visual Studio 2008 that make up the Visual Studio 2008 development environment. The four important sections are:

  • The Toolbox, which contains all the controls available for use in your Windows Mobile applications.
  • The design window of your application. This is the place where you drag and drop controls from the Toolbox.
  • The Solution Explorer where all the files and resources of your project are organized.
  • The Properties window where you can change the properties of individual controls/Windows forms.

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