Using windows system printer settings – National Instruments Window User Manual

Page 19

Advertising
background image

©

National Instruments Corporation

19

LabWindows/CVI Release Notes for Windows

Using Windows System Printer Settings

VAL_USE_PRINTER_SETTING

applies to all print attributes for which corresponding

Windows system settings exist. You can view and modify the Windows system settings for a
printer in the Control Panel. The

VAL_USE_PRINTER_SETTING

value allows you to use the

current settings of the operating system instead of the current values of the User Interface
Library attributes.

If you call one of the printing functions

PrintCtrl

,

PrintPanel

,

PrintTextBuffer

, or

PrintTextFile

and an attribute value is

VAL_USE_PRINTER_SETTING

, LabWindows/CVI

changes the attribute value to the current system setting. The exact behavior depends on
whether you instruct the printing function to invoke the print dialog box. Notice that only

PrintCtrl

and

PrintPanel

give you the option to open the dialog box:

If the function invokes the common print dialog box and the user invokes the
printer-specific dialog box, LabWindows/CVI initializes the control that corresponds to
the attribute to the current system setting. The user can modify the value. When the user
clicks on OK in the printer-specific dialog box, LabWindows/CVI stores the current
value of the control as the attribute value.

If the function invokes the common print dialog box but the user never invokes the
printer-specific dialog box, LabWindows/CVI stores the system setting as the attribute
value when the user clicks on OK in the common dialog box.

If you suppress the dialog boxes, the print function uses the current system setting and
stores it as the attribute value.

Notice that LabWindows/CVI does not retain

VAL_USE_PRINTER_SETTING

as the attribute

value after you call a printing function. If, throughout the life of your program, you want to
use the system settings that are in effect the first time you call a printing function, set the
attributes to

VAL_USE_PRINTER_SETTING

at the beginning of your program and do not

modify them programmatically thereafter. If, on the other hand, you always want to use the
most recent system settings, you must set the attributes to

VAL_USE_PRINTER_SETTING

before each call to a printing function.

You can use

VAL_USE_PRINTER_SETTING

with the following attributes:

ATTR_DUPLEX

ATTR_NUMCOPIES

ATTR_ORIENTATION

ATTR_XRESOLUTION

ATTR_YRESOLUTION

Note

The User Interface Library never changes the current system printer or the
current system settings for a printer.

Advertising