View Single Post

  #5 (permalink)  
Old 01-11-2005
Jaba Jaba is offline
Junior Member
Yellow Belt
 
Join Date: Jan 2005
Posts: 21
Great !!!! Thank you mister Wilfried !!!

Let's share this wonderful tip :

Code:
		bool select_change_busy = false;
		
		private void axMappointControl1_SelectionChange(object sender, AxMapPoint._IMappointCtrlEvents_SelectionChangeEvent e)
		{
			if (!select_change_busy)
			{
				select_change_busy=true;
				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)
				{

				}

				select_change_busy=false;
			}
		}
Reply With Quote