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


IPageLayoutControl.TrackRectangle Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IP > IPageLayoutControl Interface > IPageLayoutControl.TrackRectangle Method
ArcGIS Developer Help

IPageLayoutControl.TrackRectangle Method

Rubber-bands a rectangle on the PageLayoutControl.

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

Product Availability

Available with ArcGIS Engine.

Description

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

Errors Returned

1017 800A03F9: The current tracking or panning must complete before this method can execute. 

See Also

IPageLayoutControl Interface