API Documentation > CorelDRAW > 2025-v26 > ActiveView > IVGActiveView
ActiveView.ToFitShape method
Fits the active view to the shape
Syntax:
Sub ToFitShape(ByVal Shape As Shape)
Parameters:
Name Type Description
Shape
Remarks:
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.
Examples:
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