Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsPrintDialogMBS class.

WindowsPrintDialogMBS.Copies as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Contains the initial number of copies for the Copies edit control if DevMode is nil; otherwise, the Copies member of the DEVMODE contains the initial value.

When PrintDlgEx returns, nCopies contains the actual number of copies the application must print. This value depends on whether the application or the printer driver is responsible for printing multiple copies. If the PD_USEDEVMODECOPIESANDCOLLATE flag is set in the Flags member, nCopies is always 1 on return, and the printer driver is responsible for printing multiple copies. If the flag is not set, the application is responsible for printing the number of copies specified by nCopies. For more information, see the description of the PD_USEDEVMODECOPIESANDCOLLATE flag.
(Read and Write property)

WindowsPrintDialogMBS.DC as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The device context or an information context, depending on whether the Flags member specifies the PD_RETURNDC or PC_RETURNIC flag.

If neither flag is specified, the value of this member is undefined. If both flags are specified, PD_RETURNDC has priority.
(Read and Write property)

WindowsPrintDialogMBS.DevMode as WindowsDeviceModeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The device mode object.

On input, if an object is specified, the values in the corresponding DEVMODE structure are used to initialize the controls in the dialog box. On output, the dialog box sets DevMode to a new object that contains values specifying the user's selections. If the user's selections are not available, the dialog box sets DevMode to nil.
(Read and Write property)

WindowsPrintDialogMBS.ExclusionFlags as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
A set of bit flags that can exclude items from the printer driver property pages in the Print property sheet.

This value is used only if the PD_EXCLUSIONFLAGS flag is set in the Flags member. Exclusion flags should be used only if the item to be excluded will be included on either the General page or on an application-defined page in the Print property sheet. This member can specify the following flag.
PD_EXCL_COPIESANDCOLLATE: Excludes the Copies and Collate controls from the printer driver property pages in a Print property sheet. This flag should always be set when the application uses the default Copies and Collate controls provided by the lower portion of the General page of the Print property sheet.
(Read and Write property)

WindowsPrintDialogMBS.Flags as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
A set of bit flags that you can use to initialize the Print property sheet.

When the PrintDialog function returns, it sets these flags to indicate the user's input. This member can be one or more of the following values.

To ensure that PrintDialog returns the correct values in the Copies and Collate members of the DeviceMode, set PD_RETURNDC = TRUE and PD_USEDEVMODECOPIESANDCOLLATE = TRUE. In so doing, the Copies member of the PRINTDLG structure is always 1 and PD_COLLATE is always false.

To ensure that PrintDialog returns the correct values in nCopies and PD_COLLATE, set PD_RETURNDC = TRUE and PD_USEDEVMODECOPIESANDCOLLATE = FALSE. In so doing, dmCopies is always 1 and dmCollate is always FALSE.
Starting with Windows Vista, when you call PrintDlg or PrintDlgEx with PD_RETURNDC set to TRUE and PD_USEDEVMODECOPIESANDCOLLATE set to FALSE, the PrintDlg or PrintDlgEx function sets the number of copies in the nCopies member of the PRINTDLG structure, and it sets the number of copies in the structure represented by the hDC member of the PRINTDLG structure.
When making calls to GDI, you must ignore the value of nCopies, consider the value as 1, and use the returned hDC to avoid printing duplicate copies.
(Read and Write property)

WindowsPrintDialogMBS.FromPage as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The initial value for the starting page edit control.

When PrintDialog returns, nFromPage is the starting page specified by the user. If the Pages radio button is selected when the user clicks the Okay button, PrintDialog sets the PD_PAGENUMS flag and does not return until the user enters a starting page value that is within the minimum to maximum page range.
If the input value for either FromPage or nToPage is outside the minimum/maximum range, PrintDlg returns an error only if the PD_PAGENUMS flag is specified; otherwise, it displays the dialog box but changes the out-of-range value to the minimum or maximum value.
This is only for PrintDialog, not for PrintDialogEx.
(Read and Write property)

WindowsPrintDialogMBS.Lasterror as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The last error code.

Typical errors:
E_OUTOFMEMORY = &h8007000E // Insufficient memory.
E_INVALIDARG = &h80070057 // One or more arguments are invalid.
E_POINTER = &h80000005 // Invalid pointer.
E_HANDLE = &h80000006 // Invalid handle.
E_FAIL = &h80000008 // Unspecified error.
(Read and Write property)

WindowsPrintDialogMBS.MaxPage as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The maximum value for the page ranges specified in the Pages edit control.

If the PD_NOPAGENUMS flag is specified, this value is not valid.
(Read and Write property)

Some examples using this property:

WindowsPrintDialogMBS.MaxPageRanges as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The size, in array elements, of the PageRanges buffer.

This value indicates the maximum number of page ranges that can be stored in the array. If the PD_NOPAGENUMS flag is specified, this value is not valid. If the PD_NOPAGENUMS flag is not specified, this value must be greater than zero.
The plugin supports up to 20 page ranges.
(Read and Write property)

WindowsPrintDialogMBS.MinPage as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The minimum value for the page ranges specified in the Pages edit control.

If the PD_NOPAGENUMS flag is specified, this value is not valid.
(Read and Write property)

Some examples using this property:

WindowsPrintDialogMBS.PageRanges as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
On input, set this member to the initial number of page ranges specified.

When the PrintDialog function returns, PageRanges indicates the number of user-specified page ranges. If the PD_NOPAGENUMS flag is specified, this value is not valid. Use getPageRange to query page ranges or setPageRange to set them.
(Read and Write property)

WindowsPrintDialogMBS.Parent as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The window that owns the dialog box.

The window that owns the property sheet. This member must be a valid window handle; it cannot be nil.
Can reference a Window or DesktopWindow object.
(Read and Write property)

WindowsPrintDialogMBS.ResultAction as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
If the PrintDlgEx function returns S_OK (0), ResultAction contains the outcome of the dialog.

If PrintDialog returns an error, this member should be ignored. The ResultAction member can be one of the following values:

PD_RESULT_APPLYThe user clicked the Apply button and later clicked the Cancel button. This indicates that the user wants to apply the changes made in the property sheet, but does not want to print yet. The PRINTDLGEX structure contains the information specified by the user at the time the Apply button was clicked.
PD_RESULT_CANCELThe user clicked the Cancel button. The information in the PRINTDLGEX structure is unchanged.
PD_RESULT_PRINTThe user clicked the Print button. The PRINTDLGEX structure contains the information specified by the user.
(Read and Write property)

WindowsPrintDialogMBS.StartPanel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The property page that is initially displayed.

To display the General page, specify START_PAGE_GENERAL. For consistency, it is recommended that the property sheet always be started on the General page.
The plugin sets START_PAGE_GENERAL for default value.
(Read and Write property)

WindowsPrintDialogMBS.ToPage as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The initial value for the ending page edit control.

When PrintDialog returns, ToPage is the ending page specified by the user. If the Pages radio button is selected when the use clicks the Okay button, PrintDialog sets the PD_PAGENUMS flag and does not return until the user enters an ending page value that is within the minimum to maximum page range.
This is only for PrintDialog, not for PrintDialogEx.
(Read and Write property)

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...