Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
From the author of

Smart Device Projects

The second core piece of the support for smart device applications in VS .NET 2003 is SDP. Simply put, SDP provides the integration components necessary to build great mobile applications in VS .NET. Its core components include the project system and its support for languages.

As a result of the integration of SDP, to create a smart device project, a developer simply needs to select the Smart Device Application icon in the New Project dialog box. When selected, the Smart Device Application Wizard is invoked, as shown in Figure 1.

Figure 1Figure 1 Creating a Smart Device Project.

This figure shows the dialog box used to select the platform and project type for a new application targeting the Compact Framework.

As you can see in Figure 1, SDP supports two platform types, Pocket PC and Windows CE .NET, and, for each one, a set of project types listed below:

  • Windows Application. Used to create a form-based application using the Windows.Forms assembly. In a Pocket PC project, the forms are defaulted to the Landscape view and are 240 x 320; in Windows CE .NET, project forms are 640 x 443.

  • Class Library. Used to create a code library assembly that can be referenced by other projects. This is useful for encapsulating reusable code.

  • Console Application (Nongraphical Application). The former title appears when choosing Windows CE, while the latter is for Pocket PC. In both cases, the application does not contain windows and its execution begins via a Main method. In the case of Windows CE, output can be directed to a console window (Console.WriteLine), whereas in Pocket PC the application does not support any user interface.

  • Empty Project. An empty project that can subsequently be populated with project items.

The wizard also shows the targets that are currently available for deploying and executing the Compact Framework application. By default, SDP installs both Windows CE .NET and Pocket PC 2002 emulators and, of course, lists actual devices that may be connected to the development machine. If Pocket PC is chosen as the platform, only the Pocket PC emulator and device are shown.

As previously mentioned, SDP includes managed compilers for both VB and C#, but not any of the other managed languages. Overall, VB developers will encounter more of a subset of the desktop Framework than will C# developers. This is the case because VB in the Compact Framework does not support the intrinsic VB I/O functions or late binding. The C# language syntax, on the other hand, is 100% compatible with that in the desktop Framework and adheres to the ECMA-334 specification. However, both compilers support the full object-oriented nature of managed code and allow full implementation and interface inheritance, which makes possible code reuse and polymorphic programming.

  • + Share This
  • 🔖 Save To Your Account