将活动图形放大到指定的中心。用户可以将图形中的特定点移动到图形区域的中心。ZoomCenter 方法可用于调整对象大小并将其置于视口的中心。使用 ZoomCenter,可以通过输入相对于当前视图的放大比例来指定比例大小。
下面的样例显示了使用 ZoomCenter 以相同大小和两倍大小显示视图的效果:
Sub Ch3_ZoomCenter()
MsgBox "Perform a ZoomCenter using:" & vbCrLf & _
"Center 3, 3, 0" & vbCrLf & _
"Magnification: 10", , "ZoomCenter"
Dim Center(0 To 2) As Double
Dim magnification As Double
Center(0) = 3: Center(1) = 3: Center(2) = 0
magnification = 10
ThisDrawing.Application.ZoomCenter Center, magnification
End Sub