34.1. Getting Started

The first thing you need to do to get started building a device application is to create a smart device project. You can either create this in a new solution or, if you are adding a device component to a larger application, add it to an existing solution. You create a smart device project the same way you would any other project type. You can select the File New Project menu command, or you can select Add New Project from the right-click context menu in the Solution Explorer window. Figure 34-1 shows the New Project dialog with the Visual Basic, Smart Device node expanded. Notice that there is only one installed template, the Smart Device Project.

In previous versions this screen listed the different project types along with the different platform and framework versions. Unfortunately, this list was growing at an alarming rate with each new version of both Windows Mobile and the .NET Compact Framework.

Figure 34.1. Figure 34-1

Selecting the Smart Device Project will invoke the Add New Smart Device Project dialog, shown in Figure 34-2, where you can select the target platform and the version of the .NET Compact Framework. Note that selecting the framework version in the top right corner of the New Project dialog doesn't affect the version of the .NET Compact Framework that your device application will be targeting.

Figure 34.2. Figure 34-2

After selecting the target platform, framework version, and project type, click "OK" to generate the device application — in this case a Device Application for Windows Mobile 5 on version 3.5 of the framework.

You will notice that by default only Windows Mobile 5 is listed as a target platform. As new versions of the Windows Mobile platform become available you'll need to download the relevant SDK from the Microsoft web site, http://www.microsoft.com, in order for those platforms to be listed in the Add New Smart Device Project dialog.

When the device project is created, it will appear in the Solution Explorer window with the same layout as a full .NET Framework project. The only difference is that the device project is distinguished from other projects by the icon used. Figure 34-3 shows a single VB.NET device project in the Solution Explorer window.

Figure 34.3. Figure 34-3

Selecting the SmartDeviceProject1 node brings up additional information about the project in the properties grid. This includes the version of the .NET Framework and the platform for which this project is being written.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.11.227