Flags Property (Print Dialog)

Applies To

Common dialog1H1HYJI.

Description

Sets the options for the Print dialog box.

Usage

[form.]CMDialog.Flags[ = flag ]

Remarks

The following constants are available for the Print dialog box:

Constant

Value

Description

 

PD_ALLPAGES

&H0&

Sets or returns the state of the All Pages option button.

PD_COLLATE

&H10&

Sets or returns the state of the Collate check box.

PD_DISABLEPRINTTOFILE

&H80000&

Disables the Print to File check box.

PD_HIDEPRINTTOFILE

&H100000&

The Print to File check box is not displayed.

PD_NOPAGENUMS

&H8&

Disables the Pages option button and the associated edit control.

PD_NOSELECTION

&H4&

Disables the Selection option button.

PD_NOWARNING

&H80&

Prevents a warning message from being displayed when there is no default printer.

PD_PAGENUMS

&H2&

Sets or returns the state of the Pages option button.

PD_PRINTSETUP

&H40&

Causes the system to display the Print Setup dialog box rather than the Print dialog box.

PD_PRINTTOFILE

&H20&

Sets or returns the state of the Print to File check box.

PD_RETURNDC

&H100&

Returns a device context for the printer selection made in the dialog box. The device context is returned in the dialog boxs hDC property.

PD_RETURNIC

&H200&

Returns an information context for the printer selection made in the dialog box. An information context provides a fast way to get information about the device without creating a device context. The information context is returned in the dialog boxs hDC property.

PD_SELECTION

&H1&

Sets or returns the state of the Selection option button. If neither PD_PAGENUMS nor PD_SELECTION are specified, the All option button is in the selected state.

PD_SHOWHELP

&H800&

Causes the dialog box to display the Help button.

PD_USEDEVMODECOPIES

&H40000&

If a printer driver does not support multiple copies, setting this flag disables the copies edit control. If a driver does support multiple copies, setting this flag indicates that the dialog box should store the requested number of copies in the Copies property.

 

These flags are defined in the file CONSTANT.TXT.

You can also define selected flags.  Use the Const keyword in the declarations section of the startup form to define the flags you want to use.  For example:

Const OFN_READONLY  = &H00000001&
Const CF_EFFECTS    = &H00000100&

 

You can set more than one flag for a dialog box using the Or operator.  For example:

CMDialog1.Flags = &H10& Or &H200&

 

Adding the desired constant values produces the same results.  The following is equivalent to the preceding example:

CMDialog1.Flags = &H210&

Data Type

Long103F6YL