ComponentOne VSView 8.0
Preview Property

Returns or sets whether output saved for previewing or sent directly to the printer.

Syntax

[form!]VSPrinter.Preview [ = {True | False} ]

Remarks

If the Preview property is set to False, the VSPrinter control sends its output directly to the printer. The control will not display the document at all. If the AbortWindow property is set to True, an Abort dialog is created and shown while the document prints, so the user can abort the print job.

If the Preview property is set to True, the VSPrinter control saves all output in memory. When the document is ready, you can preview it, save it to disk, create overlays, or send it to the printer.

For example, the following code creates the same document twice: the first time it is printed directly to the printer. The second time, it remains available for previewing and later printing.

' This routine sends the document directly to the printer

' (there is no preview)

Sub PrintButton_Click ()

  vsPrinter.Preview = False

  DoPrinting

End Sub

 

' This routines creates the document in memory

' (you can preview, save, or print it later)

Sub Preview_Click ()

  vsPrinter.Preview = True

  DoPrinting

End Sub

Data Type

Boolean

Default Value

True

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback