About Defining a Zoom Window (ActiveX)

You can quickly zoom in on an area by specifying the corners that define it.

To zoom in on an area by specifying its boundaries, use either the ZoomWindow or ZoomPickWindow method. The ZoomWindow method allows you to define two points representing the Zoom window programmatically. The ZoomPickWindow method requires the user to pick two points. These two picked points become the Zoom window.

Zoom the active drawing to a window defined by two points

AutoLISP
(vl-load-com)
(defun c:Ch3_ZoomWindow()
    ;; ZoomWindow
    (alert (strcat "Perform a ZoomWindow with:\n"
                   "1.3, 7.8, 0\n"
                   "13.7, -2.6, 0"))

    (setq point1 (vlax-3d-point 1.3 7.8 0)
          point2 (vlax-3d-point 13.7 -2.6 0))

    (setq acadObj (vlax-get-acad-object))
    (vla-ZoomWindow acadObj point1 point2)
  
    ;; ZoomPickWindow
    (alert  "Perform a ZoomPickWindow")

    (vla-ZoomPickWindow acadObj)
)
VBA (AutoCAD Only)
Sub Ch3_ZoomWindow()
  ' ZoomWindow
  MsgBox "Perform a ZoomWindow with:" & vbCrLf & _
  "1.3, 7.8, 0" & vbCrLf & _
  "13.7, -2.6, 0", , "ZoomWindow"

  Dim point1(0 To 2) As Double
  Dim point2(0 To 2) As Double
  point1(0) = 1.3: point1(1) = 7.8: point1(2) = 0
  point2(0) = 13.7: point2(1) = -2.6: point2(2) = 0
  ThisDrawing.Application.ZoomWindow point1, point2
  ' ZoomPickWindow
  MsgBox "Perform a ZoomPickWindow", , "ZoomPickWindow"

  ThisDrawing.Application.ZoomPickWindow
End Sub