Object Model Reference : Classes : A : ActiveView : Methods : ActiveView.ToFitShape |
Sub ToFitShape(Shape As Shape)
Member of ActiveView
The ToFitShape method changes the active view to fit an entire shape in the current document into the application window. This method adjusts the zoom level of the page so that the specified shape fills the current view in the application window.
The following VBA example creates a circle in CorelDRAW and adjusts the active view to zoom in on the circle in the active document.
Sub ToFitShape() |
Dim s As Shape |
Set s = ActiveLayer.CreateEllipse2(5, 5, 2) |
ActiveWindow.ActiveView.ToFitShape s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.