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

IDisplay.DrawRectangle Method (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Display > ESRI.ArcGIS.Display > Interfaces > ID > IDisplay Interface > IDisplay.DrawRectangle Method
ArcGIS Developer Help

IDisplay.DrawRectangle Method

Draws specified rectangle on the display.

[Visual Basic .NET]
Public Sub DrawRectangle ( _
    ByVal rectangle As IEnvelope _
public void DrawRectangle (
    IEnvelope rectangle
HRESULT DrawRectangle(
  IEnvelope* rectangle
rectangle [in]

rectangle is a parameter of type IEnvelope*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


DrawRectangle draws a Envelope object with the symbol that must be specified before hand with the SetSymbol method. All draw methods must be enclosed between the calls to StartDrawing and FinishDrawing unless you are drawing in response to the IActiveViewEvents::AfterDraw event.

See Also

IDisplay Interface | IDisplay.StartDrawing Method