Visual Basic

The Development Environment

Creating a new Windows CE project is not much different from creating a normal Visual Basic one. A new project type, Windows CE Project, has been added, which configures the Visual Basic IDE for Windows CE development. In standard Visual Basic you can create a number of different types of project, such as Standard EXE, ActiveX EXE, and ActiveX DLL. However, a Windows CE project might only create the equivalent of a Standard EXE, or-to be more precise-a PVB file. Before you commence coding, you must configure your project's properties. The Project Properties dialog box is displayed automatically when you start a new project. Once you have dismissed the Project Properties dialog box, you will notice some changes in the IDE from that of standard Visual Basic. Figure 5-7 shows the major changes to the IDE.

Figure 5-7 Windows CE IDE changes in Visual Basic 5

The first things you will notice are the greatly reduced number of options for the Run and Debug menus. This is because the way that Windows CE programs are run in the development environment is very different from the way a standard Visual Basic project runs. The toolkit provides an emulation environment that allows you to run and debug your applications without actually having an HPC device. I will explain the emulator in more detail later, but essentially, the emulator is part of the Windows CE Platform SDK and is supplied with the Windows CE Toolkit for Visual Basic 5.

A number of new menu options have been added to help with Windows CE development, as listed here.

  • The Application Install Wizard, as the name suggests, provides the equivalent functionality as the Visual Basic Setup Wizard.
  • Books Online contains reference information and is very comprehensive. Additional information can be obtained from the Microsoft Web site.
  • Download Runtime Files transfers the Visual Basic run time files to the emulation and HPC device.
  • Control Manager downloads ActiveX controls to either the emulation or HPC environment. Any controls you use in your application will need to reside in the environment where you choose to run or debug the application.
  • Heap Walker (a scaled-down equivalent of the program supplied for other Windows versions) views the process and "heaps" information for processes running on your HPC.
  • Process Viewer provides the functionality of the PVIEWxx.EXE program supplied with other versions of Visual Basic. Process Viewer lists each module loaded in memory on the HPC. You can use this application to kill processes running on your HPC and you can also view the modules being used by a particular process.
  • The Registry Editor functions the same way as in the other Windows operating systems. This version, however, allows you to edit both the HPC and emulator Registries.
  • The Spy utility allows you to examine details of window objects that are loaded on the HPC. Like the Windows NT/9x version, Spy allows you to view the window and class information and to view the message queue to a particular window on the HPC device.
  • Zoom was originally designed to allow you to zoom in on an area of the screen to view the bit patterns. The Windows CE version has extended this functionality to allow you to also save screen shots of your HPC screen.

by BrainBellupdated