public void DrawRectangle(IEnvelope ienvelope_1) { ISceneViewer activeViewer = this._plugin.ActiveViewer; System.Drawing.Rectangle r = default(System.Drawing.Rectangle); System.Drawing.Point location = default(System.Drawing.Point); IPoint lowerLeft = ienvelope_1.LowerLeft; location.X = (int)lowerLeft.X; location.Y = (int)lowerLeft.Y; int width = (int)ienvelope_1.Width; int height = (int)ienvelope_1.Height; r.Location = location; r.Width = width; r.Height = height; System.Windows.Forms.Control control = System.Windows.Forms.Control.FromHandle(new IntPtr(activeViewer.hWnd)); System.Windows.Forms.ControlPaint.DrawReversibleFrame(control.RectangleToScreen(r), System.Drawing.Color.Black, System.Windows.Forms.FrameStyle.Thick); }