ComponentOne VSView 8.0
Device Property

Returns or sets the name of the current printer.

Syntax

[form!]VSPrinter.Device[ = value As String ]

Remarks

You can use this property to provide user feedback -- so users know which printer is currently selected -- or to select the printer you want to use.

You cannot change this property while creating a document. If you want to select a device, do so before calling the StartDoc method. You can only set this property to a valid device name. To obtain a list of valid device names, read the Devices() property.

If the DefaultDevice property is set to True, the device selected will become the default device for all Windows applications.

If you want to select the default Windows device, assign an empty string to the Device property, as shown below:

' select default Windows device

vsPrinter.Device = ""

Note: In addition to all the printers attached to the computer, you can also set the Device property to "Display". This causes the control to create a printer-independent document.  In this case, instead of relying on the printer driver to obtain information such as resolution, orientation, and paper size, the control uses the screen resolution as a reference and allows you to set the PaperWidth and PaperHeight properties to any values you want.  For example:

vsPrinter.Device = "Display"

In this mode, you can still create, preview, export, and save documents. However, you cannot print them with the PrintDoc method.

Data Type

String

 

 


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

Product Support Forum  |  Documentation Feedback