Windows Mobile 6.5

What’s New in Windows Mobile 6.5 :

•WM6.5 is finally starting to become finger-friendly.
•Throughout the entire OS you can drag to scroll
•Many UI elements like the Start Menu are thumb-friendly, as are all of the soft-key menus.

Developer Tools :

Windows Mobile 6 SDK

Windows Mobile 6.5 DTK

Visual Studio 2008

Windows Mobile Device Center (Windows Vista and above versions)

Active Sync (Windows XP and earlier versions)

My First Application :

Step 1 : Choose a Proramming Language

Visual C++ (Native coding language)

Visual C# /VB.Net (Managed Coding)

Client Side – JScript

Server Side – Asp.Net

Step 2 : Select the template

Choose “Device Application”

Step 3 : Run and Debug the application

Step 4 : Save the state of the emulator

Useful for saving your own configuration for any type of Device Emulator

Once you have completed your setting Save the State by selecting Save and Exit in the File Menu in Device Emulator

A saved state file contains all RAM, ROM, and settings information from the Device Emulator.

It has the extension .dess (Device Emulator Saved State)

The .dess file is the only file necessary to restore a saved state.

The .dess extension is registered at setup, so double-clicking a .dess file launches the Device Emulator with the state saved in that file

You can find the .dess file @

C:\Users\Darnie\AppData\Roaming\Microsoft\Device Emulator

The state of the Emulator is saved in VMID (Virtual Machine Identifier) with a .dess extension

Launching  a Emulator From Visual Studio 2008 :

Tools -> Connect to Device

Tools – > Device Emulator Manager

 Launching the Device Emulator as a Stand alone application

dvcemumanager.exe

 Launching the Device Emulator from Command Line

DeviceEmulator.exe

Steps to Use GPS Intermediate Driver in Managed Code :

Step 1 : Upgrade the Sample Application

The Sample Application is Written in VS2005 therefor upgrade and buid the solution

Step 2 : Add reference to the GPS application

Microsft.WindowsMobile.Samples.Location

Call the Classes in your project thru “Using”

using Microsoft.WindowsMobile.Samples.Location;

Once you have added reference the GpsDeviceState and GpsPosition helper object store data about you current location

Step 3 : Create a gps object for the class Gps and initialize the helper objects.

Gps gps = new Gps();

GpsDeviceState device = null;

GpsPosition position = null;

Step 4 : Add event handlers for the DeviceStateChanged and  LocationChanged events of the Gps object

updateDataHandler = new System.EventHandler(UpdateData);

gps.DeviceStateChanged += new Microsoft.WindowsMobile.Samples.

Location.DeviceStateChangedEventHandler(gps_DeviceStateChanged);

gps.LocationChanged += new Microsoft.WindowsMobile.Samples.

Location.LocationChangedEventHandler(gps_LocationChanged);

Step 5 : Implement the Event Handlers and in the implementation part call the Invoke to trigger an Event and call the UpdateDataHandler

protected void gps_LocationChanged(object sender,

LocationChangedEventArgs args)

{

position = args.Position;

Invoke(updateDataHandler);

}

Step 6 : Inside the UpdateDataHandler receive the latitude and longitude values and display it.

void UpdateData(object sender, System.EventArgs args)

{

if (gps.Opened)

{

// verify that the device object is not null

if (device != null)

{

// display device status

StatusLabel.Text = device.FriendlyName + “Status: ” +

device.ServiceState + “, ” + device.DeviceState;

}

// verify that the position object is not null

if (position != null)

{

//The position object exposes

// additional properties that indicate

//which properties are currently valid.

if (position.LatitudeValid)

{

// display latitude

LatitudeLabel.Text = “Latitude(D,M,S): ” +

position.LatitudeInDegreesMinutesSeconds;

}

 

Leave a comment