Hi all
I have developped an application that uses the MapPoint control (2002). It works fine on my development station (XP PRO) and another XP PRO machine also... But on a 3rd machine I get the exception "the parameter is incorrect" when it needs to show a map in the control...
I don't understand why... I think It is a problem with Windows XP Pro but I'm not sure...
Here is the function that causes the error (on one machine only) :
Code:try { MapPoint.Map mpmap = this.axMappointControl1.ActiveMap; object temp = "Navigation"; MapPoint.Toolbar toolbar = this.axMappointControl1.Toolbars.get_Item(ref temp); toolbar.Visible = true; int i=0; while ( (g_dLat[i] != -1) && (g_dLong[i] != -1) ) { mpmap = this.axMappointControl1.ActiveMap; mploc[i] = mpmap.GetLocation(g_dLat[i], g_dLong[i], 1); if(i==0) mploc[i].GoTo(); MapPoint.Shape sh = null; if (bLinkedByLine == true) { if(i>0) { sh = mpmap.Shapes.AddLine(mploc[i-1], mploc[i]); sh.Line.Weight= 1; } } MapPoint.Pushpin pp = null; pp = mpmap.AddPushpin(mploc[i], i.ToString()); pp.Symbol = iSymbol; i++; } mpmap.ZoomOut(); mpmap.ZoomOut(); } catch(Exception ex) { MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Warning); }
I'm sure that it is not a error in code that causes the error, because this application has been tested during one month and it has never shown this exception... It should be specific to the windows XP pro machine... But what on this computer can cause this ?
Thank you.