PDA

View Full Version : RaceOnRCWCleanup error with MapPoint 2004 ActiveX Control



emm-stritzinger
10-09-2006, 04:12 AM
Hello,

I'm using the ActiveX Control of MapPoint 2004 in a .NET 2.0 Windows Forms Application. I've put the ActiveX Control on a UserControl which works pretty good. The only problem is when I close the UserControl I sometimes get an RaceOnRCWCleanup error. I think the error only occurs when use the mnemonic assigned with the close button, but I'm not 100% sure of that.

The following code is used for closing the UserControl:
private void btClose_Click(object sender, EventArgs e)
{
if (axMapPoint.ActiveMap != null)
{


axMapPoint.ActiveMap.Saved = true;
}

//Removes the active UserControl from the form & calls Dispose() on it.
Program.MainForm.CurrentUserControl = new MainMenuCtrl();
}

Any help would be appreciated.

Regards,
Gregor