This document is archived and information here might be outdated.  Recommended version.


IMapControlDefault.TrackPolygon Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IM > IMapControlDefault Interface > IMapControlDefault.TrackPolygon Method
ArcGIS Developer Help

IMapControlDefault.TrackPolygon Method

Rubber-bands a polygon on the MapControl.

[Visual Basic .NET]
Public Function TrackPolygon ( _
) As IGeometry
[C#]
public IGeometry TrackPolygon (
);
[C++]
HRESULT TrackPolygon(
void
);

Product Availability

Available with ArcGIS Engine.

Description

TrackPolygon returns a geometry object that implements IPolygon.

Remarks

Use the TrackPolygon method within the IMapControlEvents2::OnMouseDown event to rubberband a user defined polygon. The IMapControlEvents2::OnMouseMove event will be triggered during the track, but no IMapControlEvents2::OnMouseUp event will occur. The ESC key on the keyboard can be used during the track to cancel the TrackPolygon.

Calling ITopologicalOperator::Simplify on the digitized polygon will ensure that it is topologically correct.

 

 

See Also

IMapControlDefault Interface