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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 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 PrintDialog returns an error, this member should be ignored. The ResultAction member can be one of the following values:
PD_RESULT_APPLY | The 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_CANCEL | The user clicked the Cancel button. The information in the PRINTDLGEX structure is unchanged. |
PD_RESULT_PRINT | The user clicked the Print button. The PRINTDLGEX structure contains the information specified by the user. |
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 |
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 |
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.