PrinterDefault Property

Applies To

Common dialog1H1HYJI (print dialog).


Determines if the user's selections in the Print dialog box are used to change the system's default printer settings.


[form.]CMDialog.PrinterDefault[ =True | False}]


When this property is set to True, any selections the user makes in the Setup portion of the Print dialog box (printer selection, orientation, and so on) are used to change the printer settings in the user's WIN.INI file.

When PrinterDefault is True, you can write code to print directly to the Visual Basic Printer object.  Otherwise, you must use the Windows graphic device interface (GDI) calls to print to the printer specified by the control's hDC property.


Note   If you have previously printed to the Printer object, make sure you have ended that print job using Printer.EndDoc.  This releases the hDC associated with that printer.  You will get a new hDC for the default printer the next time you print to the Printer object.  If you don't do this, it is possible for the user to select a new printer while the Printer object contains a handle to the old printer.


Data Type

IntegerDOKXHY (Boolean)