property ExPrint.PreviewState as PreviewStateEnum
Returns or sets the visual state of preview mainframe at runtime.

TypeDescription
PreviewStateEnum A PreviewStateEnum expression that specifies the visual state of preview mainframe at runtime.
By default, The PreviewState property is exPreviewStateNormal. The PreviewState property returns or sets the visual state of preview mainframe at runtime. For instance, you can use the PreviewState property to programmatically maximize the preview window. The Foreground property brings the Preview window on the foreground and activates it. Use the Preview method to invoke the Print Preview Main Frame, that allows you to preview the object being printed on the paper. The PrintExt/PrintExts property specifies the object being previewed / printed.

The following VB sample shows how you can programmatically maximize the Print and Print preview window:

Set p = CreateObject("Exontrol.Print")
With p
    .PrintExt = G2antt1.Object
    .PreviewState = exPreviewStateMaximized
    .Preview
End With