![]() |
![]() |
Document.Views
Property Views As Views
Member of Document
The Views property returns the Views collection of all views saved in the View Manager docker.
The Views property returns a read-only value.
The following code example creates a new document and saves the current view as Saved View. It then creates a rectangle, zooms in on it, saves the resulting view as Full Rectangle, shows a message box, and restores the original view.
Sub Test() Dim d As Document Dim v As View Dim s As Shape Set d = CreateDocument Set v = d.Views.AddActiveView("Saved View") Set s = d.ActiveLayer.CreateRectangle(0, 0, 2, 2) d.ActiveWindow.ActiveView.ToFitShape s d.Views.AddActiveView "Full Rectangle" MsgBox "Zoomed in at the rectangle. Press OK to restore view." v.Activate End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.