1.0 SP1 1.0.3111.0
1.0 SP2 1.0.3316.0
1.0 SP3 1.0.4292.0
2.0 RTM 2.0.5238.0
2.0 SP1 2.0.6129.0
2.0 SP2 2.0.7045.0
3.5 Beta 1 3.5.7066.0
3.5 Beta 2 3.5.7121.0
RTM 3.5.7283.0

Source: http://en.wikipedia.org/wiki/.NET_vCompact_Framework

Knowing the version number of the .NET CF installed in your device is useful at development time because it helps you determine the exact version of the .NET CF installed on the target device/emulator.

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:

□ The class libraries in the .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 the .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 18-4 shows the version of the .NET CF installed on a Windows Mobile emulator (more on this later).

Figure 18-4

Windows Mobile 5.0 devices comes with the .NET CF 1.0 preinstalled in ROM, whereas the newer Windows Mobile 6 devices come with the .NET CF 2.0 preinstalled in ROM. If your application uses the newer .NET CF v3.5, you will need to install it onto the device before applications based on it can execute.

Obtaining the Appropriate SDKs and Tools

To develop Windows Mobile applications using the .NET CF, you need to download the SDK for each platform. Here are the SDKs you need:

□ Windows Mobile 5.0 SDK for Pocket PC

□ Windows Mobile 5.0 SDK for Smartphone

□ Windows Mobile 6 Professional and Standard Software Development Kits Refresh

You can download the SDKs from Microsoft's web site (http://microsoft.com/downloads) at no cost. The best tool to develop Windows Mobile applications using the .NET CF is to use the Visual Studio IDE, using Visual Studio 2005 Professional or above.

If you are using Visual Studio 2005, you need to download the Windows Mobile 5.0 SDK for Pocket PC and Smartphone (as described earlier). If you are using Visual Studio 2008, the Windows Mobile 5.0 SDKs for Pocket PC and Smartphone are already installed by default. For both versions, you need to download the Windows Mobile 6 SDKs to develop applications for Windows Mobile 6 devices.

With the relevant SDKs installed, the first step toward Windows Mobile development 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 (see Figure 18-5).

Figure 18-5

The Add New Smart Device Project dialog opens. You can select the target platform as well as the version of the .NET CF you want to use (see Figure 18-6).

Figure 18-6 

You are now ready to start developing for Windows Mobile. Figure 18-7 shows the design view of a Windows Mobile Form in Visual Studio 2008 designer.

Figure 18-7 

Building the RSS Reader Application

With the recent introduction of the Windows Mobile 6 platforms, we are now beginning to see a proliferation of new devices supporting Windows Mobile 6 Standard (aka Smartphone). As Windows Mobile 6 Standard devices do not have touch screens, they pose certain challenges when developing applications to run on them. Hence, in this section you will learn how to develop a Windows Mobile 6 Standard application that allows users to subscribe to RSS feeds.

The RSS Reader application has the following capabilities:

□ Can subscribe to RSS feeds as well as unsubscribe from feeds

□ Can cache the feeds as XML files on the device so that if the device goes offline the feeds are still available

Вы читаете C# 2008 Programmer's Reference
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату