Wanting to develop for WM haivng some problems

Hi I want to make an application using location, I found this tutorial



which looks very helpful but because I am new to visual studio I am having some problems.

1) is the article it says "This article includes complete sample code." but I cant find a download for all the code.

2) he only mentions referencing Microsoft.WindowsMobile.Samples.Location.dll which I have done but the class LatLong is still unknown

3) I made a sample program without the LatLong class just to experiment I get the following error on my device

"Microsoft.WindowsMobile.Samples.Location, Version=1.0.3448.25673, Culture=neutral, PublicKeyToken=null, or one of its dependencies, was not found

any idea what this means?

4) Could all my problems be because I am using visual studio 2005 and not 2008? I found a code project that looked really helpful but when trying to open it it says that it cant because it is from a newer version of the software, anything that can be done?

5) I find MSDN confusing for finding out what to reference to add a class for example this is the page for the LatLong class
with the java online info the first thing you always see is where the class is found but it seems to be missing for this class. Other basig classes appear similar to java.



below is my sample code its basically taken from the article but I have commented out the references to LatLong and put in checks instead

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.Samples.Location;

namespace DeviceApplication3
{

public partial class Form1 : Form
{
private Gps gps;
int count = 0;
public Form1()
{
InitializeComponent();
gps = new Gps();
gps.Open();
}

private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = (getGpsString());
}
private string getGpsString()
{
GpsPosition position = gps.GetPosition();
/*LatLong location = new LatLong();

if (position.LatitudeValid)
location.Latitude = position.Latitude;
if (position.LongitudeValid)
location.Longitude = position.Longitude;
if (position.HeadingValid)
location.Heading = position.Heading;*/

StringBuilder sb = new StringBuilder();
sb.Append("\n");
sb.Append("Latitude = ");
if (position.LatitudeValid)
{
sb.Append(position.Latitude.ToString() + "\n");
}
else
{
sb.Append("Not found yet\n");
}
sb.Append("Longitude = ");
if (position.LongitudeValid)
{
sb.Append(position.Longitude.ToString() + "\n");
}
else
{
sb.Append("Not found yet\n");
}
sb.Append("Heading = ");
if (position.HeadingValid)
{
sb.Append(position.Heading.ToString() + "\n");
}
else
{
sb.Append("Not found yet\n");
}

return sb.ToString();

}
}
}

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by kristin64
2 hours ago
Last post by ykoss
4 hours ago
Last post by orion.ryan
3 hours ago
Last post by barbara.sanford
4 hours ago
Last post by yondricka
2 hours ago