This document is archived and information here might be outdated. Recommended version. |
Rubber-bands a rectangle on the MapControl.
[Visual Basic .NET] Public Function TrackRectangle ( _ ) As IEnvelope
[C#] public IEnvelope TrackRectangle ( );
[C++]
HRESULT TrackRectangle(
void
);
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.