Platforms to show: All Mac Windows Linux Cross-Platform
Back to WindowsDeviceModeMBS class.
WindowsDeviceModeMBS.Collate as Integer
Function:
Specifies whether collation should be used when printing multiple copies.
Notes:
This member is ignored unless the printer driver indicates support for collation by setting the dmFields member to DM_COLLATE.
This member can be one of the following values:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
This member is ignored unless the printer driver indicates support for collation by setting the dmFields member to DM_COLLATE.
This member can be one of the following values:
Value | Meaning |
DMCOLLATE_TRUE | Collate when printing multiple copies. |
DMCOLLATE_FALSE | Do not collate when printing multiple copies. |
WindowsDeviceModeMBS.Color as Integer
Function:
Switches between color and monochrome on color printers.
Notes:
The following are the possible values:
DMCOLOR_COLOR
DMCOLOR_MONOCHROME
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
The following are the possible values:
DMCOLOR_COLOR
DMCOLOR_MONOCHROME
(Read and Write property)
WindowsDeviceModeMBS.Copies as Integer
Function:
Selects the number of copies printed if the device supports multiple-page copies.
Example:
Notes:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim w as WindowsDeviceModeMBS // your device mode object
w.Copies = 3
w.Fields = BitwiseOr(w.Fields, w.DM_COPIES)
WindowsDeviceModeMBS.Data as Integer
Function:
The raw data pointer to the DEVMODEW structure.
Notes: (Read only property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes: (Read only property)
WindowsDeviceModeMBS.DefaultSource as Integer
Function:
Specifies the paper source.
Notes:
Use the DMBIN_* constants.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
Use the DMBIN_* constants.
(Read and Write property)
Some examples using this property:
WindowsDeviceModeMBS.DeviceName as String
Function:
A string that specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP LaserJet.
Notes:
This string is unique among device drivers. Note that this name may be truncated to fit in the dmDeviceName field.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
This string is unique among device drivers. Note that this name may be truncated to fit in the dmDeviceName field.
(Read and Write property)
WindowsDeviceModeMBS.DitherType as Integer
Function:
Specifies how dithering is to be done.
Notes:
The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMDITHER_USER.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMDITHER_USER.
Value | Meaning |
DMDITHER_NONE | No dithering. |
DMDITHER_COARSE | Dithering with a coarse brush. |
DMDITHER_FINE | Dithering with a fine brush. |
DMDITHER_LINEART | Line art dithering, a special dithering method that produces well defined borders between black, white, and gray scaling. It is not suitable for images that include continuous graduations in intensity and hue, such as scanned photographs. |
DMDITHER_GRAYSCALE | Device does gray scaling. |
WindowsDeviceModeMBS.DriverExtra as Integer
Function:
Contains the number of bytes of private driver-data that follow this structure. If a device driver does not use device-specific information, set this member to zero.
Notes: (Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes: (Read and Write property)
WindowsDeviceModeMBS.DriverVersion as Integer
Function:
The driver version number assigned by the driver developer.
Notes: (Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes: (Read and Write property)
WindowsDeviceModeMBS.Duplex as Integer
Function:
Selects duplex or double-sided printing for printers capable of duplex printing.
Notes:
Following are the possible values.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
Following are the possible values.
Value | Meaning |
DMDUP_SIMPLEX | Normal (nonduplex) printing. |
DMDUP_HORIZONTAL | Short-edge binding, that is, the long edge of the page is horizontal. |
DMDUP_VERTICAL | Long-edge binding, that is, the long edge of the page is vertical. |
WindowsDeviceModeMBS.Fields as Integer
Function:
Specifies whether certain properties have been initialized.
Notes:
If a property is initialized, its corresponding bit is set, otherwise the bit is clear. A driver supports only those properties that are appropriate for the printer or display technology.
Use the DM_* constants which match by name their property. So the DM_ORIENTATION bit value is related to the Orientation property.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
If a property is initialized, its corresponding bit is set, otherwise the bit is clear. A driver supports only those properties that are appropriate for the printer or display technology.
Use the DM_* constants which match by name their property. So the DM_ORIENTATION bit value is related to the Orientation property.
(Read and Write property)
WindowsDeviceModeMBS.FormName as String
Function:
A string array that specifies the name of the form to use; for example, "Letter" or "Legal".
Notes:
A complete set of names can be retrieved by using the GetPrinterFormats function on the WindowsPrinterListMBS class.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
A complete set of names can be retrieved by using the GetPrinterFormats function on the WindowsPrinterListMBS class.
(Read and Write property)
Some examples using this property:
WindowsDeviceModeMBS.ICMIntent as Integer
Function:
Specifies which color matching method, or intent, should be used by default.
Notes:
This member is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. This member can be one of the following predefined values, or a driver defined value greater than or equal to the value of DMICM_USER.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
This member is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. This member can be one of the following predefined values, or a driver defined value greater than or equal to the value of DMICM_USER.
Value | Meaning |
DMICM_ABS_COLORIMETRIC | Color matching should optimize to match the exact color requested without white point mapping. This value is most appropriate for use with proofing. |
DMICM_COLORIMETRIC | Color matching should optimize to match the exact color requested. This value is most appropriate for use with business logos or other images when an exact color match is desired. |
DMICM_CONTRAST | Color matching should optimize for color contrast. This value is the most appropriate choice for scanned or photographic images when dithering is desired. |
DMICM_SATURATE | Color matching should optimize for color saturation. This value is the most appropriate choice for business graphs when dithering is not desired. |
WindowsDeviceModeMBS.ICMMethod as Integer
Function:
Specifies how ICM is handled.
Notes:
For a non-ICM application, this member determines if ICM is enabled or disabled. For ICM applications, the system examines this member to determine how to handle ICM support. This member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMICMMETHOD_USER.
The printer driver must provide a user interface for setting this member. Most printer drivers support only the DMICMMETHOD_SYSTEM or DMICMMETHOD_NONE value. Drivers for PostScript printers support all values.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
For a non-ICM application, this member determines if ICM is enabled or disabled. For ICM applications, the system examines this member to determine how to handle ICM support. This member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMICMMETHOD_USER.
Value | Meaning |
DMICMMETHOD_NONE | Specifies that ICM is disabled. |
DMICMMETHOD_SYSTEM | Specifies that ICM is handled by Windows. |
DMICMMETHOD_DRIVER | Specifies that ICM is handled by the device driver. |
DMICMMETHOD_DEVICE | Specifies that ICM is handled by the destination device. |
The printer driver must provide a user interface for setting this member. Most printer drivers support only the DMICMMETHOD_SYSTEM or DMICMMETHOD_NONE value. Drivers for PostScript printers support all values.
(Read and Write property)
WindowsDeviceModeMBS.LogPixels as Integer
Function:
The number of pixels per logical inch.
Notes:
Printer drivers do not use this member.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
Printer drivers do not use this member.
(Read and Write property)
Some examples using this property:
WindowsDeviceModeMBS.MediaType as Integer
Function:
Specifies the type of media being printed on.
Notes:
The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMMEDIA_USER.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMMEDIA_USER.
Value | Meaning |
DMMEDIA_STANDARD | Plain paper. |
DMMEDIA_GLOSSY | Glossy paper. |
DMMEDIA_TRANSPARENCY | Transparent film. |
WindowsDeviceModeMBS.Nup as Integer
Function:
Specifies where the NUP is done.
Notes:
It can be one of the following.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
It can be one of the following.
Value | Meaning |
DMNUP_SYSTEM | The print spooler does the NUP. |
DMNUP_ONEUP | The application does the NUP. |
WindowsDeviceModeMBS.Orientation as Integer
Function:
For printer devices only, selects the orientation of the paper.
Example:
Notes:
This member can be either DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim d as new WindowsDeviceModeMBS
dim name as string = "My printer"
// here we define which values we want to change
d.Fields = d.DM_ORIENTATION
// and change value
d.Orientation = d.DMORIENT_PORTRAIT
dim w as WindowsPrinterMBS = WindowsPrinterMBS.OpenPrinter(name)
if w.ChangePrinterSettings(d, 2) then
MsgBox "OK"
else
MsgBox "Failed"
end if
This member can be either DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).
(Read and Write property)
WindowsDeviceModeMBS.PaperLength as Integer
Function:
For printer devices only, overrides the length of the paper specified by the PaperSize member, either for custom paper sizes or for devices such as dot-matrix printers that can print on a page of arbitrary length.
Notes:
These values, along with all other values in this structure that specify a physical length, are in tenths of a millimeter.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
These values, along with all other values in this structure that specify a physical length, are in tenths of a millimeter.
(Read and Write property)
Some examples using this property:
WindowsDeviceModeMBS.PaperSize as Integer
Function:
For printer devices only, selects the size of the paper to print on.
Notes:
This member can be set to zero if the length and width of the paper are both set by the PaperLength and PaperWidth members. Otherwise, the PaperSize member can be set to a device specific value greater than or equal to DMPAPER_USER or to one of the following predefined values with DMPAPER_* constants.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
This member can be set to zero if the length and width of the paper are both set by the PaperLength and PaperWidth members. Otherwise, the PaperSize member can be set to a device specific value greater than or equal to DMPAPER_USER or to one of the following predefined values with DMPAPER_* constants.
(Read and Write property)
WindowsDeviceModeMBS.PaperWidth as Integer
Function:
For printer devices only, overrides the width of the paper specified by the PaperSize member.
Notes:
Unit is tenths of a millimeter.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
Unit is tenths of a millimeter.
(Read and Write property)
Some examples using this property:
WindowsDeviceModeMBS.PrintQuality as Integer
Function:
Specifies the printer resolution.
Notes:
There are four predefined device-independent values:
DMRES_HIGH
DMRES_MEDIUM
DMRES_LOW
DMRES_DRAFT
If a positive value is specified, it specifies the number of dots per inch (DPI) and is therefore device dependent.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
There are four predefined device-independent values:
DMRES_HIGH
DMRES_MEDIUM
DMRES_LOW
DMRES_DRAFT
If a positive value is specified, it specifies the number of dots per inch (DPI) and is therefore device dependent.
(Read and Write property)
Some examples using this property:
WindowsDeviceModeMBS.Scale as Integer
Function:
Specifies the factor by which the printed output is to be scaled.
Notes:
The apparent page size is scaled from the physical page size by a factor of Scale /100. For example, a letter-sized page with a dmScale value of 50 would contain as much data as a page of 17- by 22-inches because the output text and graphics would be half their original height and width.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
The apparent page size is scaled from the physical page size by a factor of Scale /100. For example, a letter-sized page with a dmScale value of 50 would contain as much data as a page of 17- by 22-inches because the output text and graphics would be half their original height and width.
(Read and Write property)
WindowsDeviceModeMBS.Size as Integer
Function:
Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members.
Notes:
You don't need to set this field normally as the plugin does that for you.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
You don't need to set this field normally as the plugin does that for you.
(Read and Write property)
WindowsDeviceModeMBS.SpecVersion as Integer
Function:
The version number of the initialization data specification on which the structure is based.
Notes:
You don't need to set this field normally as the plugin does that for you.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
You don't need to set this field normally as the plugin does that for you.
(Read and Write property)
WindowsDeviceModeMBS.TTOption as Integer
Function:
Specifies how TrueType fonts should be printed.
Notes:
This member can be one of the following values:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
This member can be one of the following values:
Value | Meaning |
DMTT_BITMAP | Prints TrueType fonts as graphics. This is the default action for dot-matrix printers. |
DMTT_DOWNLOAD | Downloads TrueType fonts as soft fonts. This is the default action for Hewlett-Packard printers that use Printer Control Language (PCL). |
DMTT_DOWNLOAD_OUTLINE | Downloads TrueType fonts as outline soft fonts. |
DMTT_SUBDEV | Substitutes device fonts for TrueType fonts. This is the default action for PostScript printers. |
Some examples using this property:
WindowsDeviceModeMBS.YResolution as Integer
Function:
Specifies the y-resolution, in dots per inch, of the printer.
Notes:
If the printer initializes this member, the PrintQuality member specifies the x-resolution, in dots per inch, of the printer.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Printing | MBS Win Plugin | 10.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Notes:
If the printer initializes this member, the PrintQuality member specifies the x-resolution, in dots per inch, of the printer.
(Read and Write property)
The items on this page are in the following plugins: MBS Win Plugin.
