Control Reference > VSViewPort Control > VSViewPort Methods > SetVirtualExtent Method |
Sets the VirtualWidth and VirtualHeight properties to fit the contained controls.
[form!]VSViewPort.SetVirtualExtent [ VirtualWidth As Variant ], [ VirtualHeight As Variant ]
This method allows you to set the VirtualWidth and VirtualHeight properties simultaneously.
If you omit one or both of the parameters, the corresponding dimensions are set automatically, based on the contents of the VSViewPort control. To set the dimensions automatically, the control scans its contents and determines the how large each virtual dimension must be so that all contained controls can be made visible with the scroll bars.