ArcObjects Library Reference (Controls)  

IMapControlDefault.TrackRectangle Method

Rubber-bands a rectangle on the MapControl.

[Visual Basic .NET]
Public Function TrackRectangle ( _
) As IEnvelope
[C#]
public IEnvelope TrackRectangle (
);
[C++]
HRESULT TrackRectangle(
  IEnvelope** rectangle
);
[C++]

Parameters

rectangle [out, retval]

  rectangle is a parameter of type IEnvelope

Product Availability

Available with ArcGIS Engine.

Description

Use the TrackRectangle method within the IMapControlEvents2::OnMouseDown event to rubberband a user defined rectangle. 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 TrackRectangle.

See Also

IMapControlDefault Interface | IMapControl3.TrackCircle Method | IMapControl4.TrackCircle Method | IMapControlDefault.TrackCircle Method | IMapControl4.TrackLine Method | IMapControlDefault.TrackLine Method | IMapControl3.TrackLine Method | IMapControlDefault.TrackPolygon Method | IMapControl3.TrackPolygon Method | IMapControl4.TrackPolygon Method

.NET Samples

Geoevents in a MapControl (Code Files: GeoEvents)