Thanks. I've taken a look at these threads and they are interesting.
In order to prevent the user from moving pushpins and shapes I've tried the following code but I alway get a "Stack Overflow" error from the C# runtime :
Code:
private void axMappointControl1_SelectionChange(object sender, AxMapPoint._IMappointCtrlEvents_SelectionChangeEvent e)
{
// I don't cast anything here because I consider any selection to be a shape or pushpin
MapPoint.Shape sp;
MapPoint.Location loc;
try
{
loc = axMappointControl1.ActiveMap.GetLocation(80,0,0);
sp = axMappointControl1.ActiveMap.Shapes.AddShape(MapPoint.GeoAutoShapeType.geoShapeRectangle,loc,1,1);
sp.Select();
sp.Delete();
}
catch(Exception)
{
}
}
the error is :
An unhandled exception of type 'System.StackOverflowException' occurred in axinterop.mappoint.dll