Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Cruising the Interstate with Windows Mobile 6 Development : Page 3

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.


advertisement
Drag-and-Drop: Building the User Interface
Building a Windows Mobile application's UI is straightforward—simply drag-and-drop the controls you want from the Toolbox. Figure 6 shows three controls (Label, TextBox, and Button) dragged and dropped onto Form1's design view. To change the look of each control (such as change its text, size, color, etc.), select the control and change its properties in the Properties window.

Figure 6. Form1: Populating a Windows form with controls.

Coding
With the UI built, you can switch to the code-behind of Form1 and write the code to wire up all the various controls on the form. In WindowsMobileApp, double-click on the Button control to handle its Click event so that when the user clicks on the button it will display the user's name.



Code the Click event of the Button control as shown in Listing 1.

Once the coding is done, you're ready to test the application. To test Windows Mobile applications, you have two choices:

  • Using the emulators provided by the SDKs
  • Using a real device
Testing Using Emulators
The SDKs for the various platforms include various emulators for you to test your Windows Mobile applications without needing to use a real device. For example, if your project is targeting the Windows Mobile 6 platform, you would see a list of emulators available for your testing (see Figure 7).


Figure 7. Emulators: The list of emulators available for your testing.
 
Figure 8. Testing: You can test the application on an emulator.

Once you have selected an emulator to use, press F5 to deploy the application onto the emulator for testing (see "Figure 8).

Testing Using Real Devices
While most testing can be performed on the emulators, there are situations where you really need an actual device to fully test your application. For example, suppose your application uses infrared communication—you'll need access to a device with that capability.

Testing your Windows Mobile application on real devices could not be easier. All you need is to:

  • Download and install ActiveSync (or Windows Mobile Device Manager for Windows Vista).
  • Connect your device to your development machine.
  • Select Windows Mobile 6 Professional Device in Visual Studio 2008.
  • Press F5 and the application will now be deployed to the device.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap