Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsDeviceModeMBS class.

WindowsDeviceModeMBS.Collate as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies whether collation should be used when printing multiple copies.

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:

ValueMeaning
DMCOLLATE_TRUECollate when printing multiple copies.
DMCOLLATE_FALSEDo not collate when printing multiple copies.
(Read and Write property)

WindowsDeviceModeMBS.Color as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Switches between color and monochrome on color printers.

The following are the possible values:
DMCOLOR_COLOR
DMCOLOR_MONOCHROME
(Read and Write property)

WindowsDeviceModeMBS.Copies as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Selects the number of copies printed if the device supports multiple-page copies.
Example
dim w as WindowsDeviceModeMBS // your device mode object

w.Copies = 3
w.Fields = BitwiseOr(w.Fields, w.DM_COPIES)

(Read and Write property)

WindowsDeviceModeMBS.Data as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 12.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The raw data pointer to the DEVMODEW structure.

(Read only property)

WindowsDeviceModeMBS.DefaultSource as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies the paper source.

Use the DMBIN_* constants.
(Read and Write property)

Some examples using this property:

WindowsDeviceModeMBS.DeviceName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
A string that specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP LaserJet.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies how dithering is to be done.

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.

ValueMeaning
DMDITHER_NONENo dithering.
DMDITHER_COARSEDithering with a coarse brush.
DMDITHER_FINEDithering with a fine brush.
DMDITHER_LINEARTLine 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_GRAYSCALEDevice does gray scaling.
(Read and Write property)

WindowsDeviceModeMBS.DriverExtra as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
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.

(Read and Write property)

WindowsDeviceModeMBS.DriverVersion as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The driver version number assigned by the driver developer.

(Read and Write property)

WindowsDeviceModeMBS.Duplex as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Selects duplex or double-sided printing for printers capable of duplex printing.

Following are the possible values.

ValueMeaning
DMDUP_SIMPLEXNormal (nonduplex) printing.
DMDUP_HORIZONTALShort-edge binding, that is, the long edge of the page is horizontal.
DMDUP_VERTICALLong-edge binding, that is, the long edge of the page is vertical.
(Read and Write property)

WindowsDeviceModeMBS.Fields as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies whether certain properties have been initialized.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
A string array that specifies the name of the form to use; for example, "Letter" or "Legal".

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies which color matching method, or intent, should be used by default.

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.

ValueMeaning
DMICM_ABS_COLORIMETRICColor matching should optimize to match the exact color requested without white point mapping. This value is most appropriate for use with proofing.
DMICM_COLORIMETRICColor 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_CONTRASTColor matching should optimize for color contrast. This value is the most appropriate choice for scanned or photographic images when dithering is desired.
DMICM_SATURATEColor matching should optimize for color saturation. This value is the most appropriate choice for business graphs when dithering is not desired.
(Read and Write property)

WindowsDeviceModeMBS.ICMMethod as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies how ICM is handled.

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.

ValueMeaning
DMICMMETHOD_NONESpecifies that ICM is disabled.
DMICMMETHOD_SYSTEMSpecifies that ICM is handled by Windows.
DMICMMETHOD_DRIVERSpecifies that ICM is handled by the device driver.
DMICMMETHOD_DEVICESpecifies 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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The number of pixels per logical inch.

Printer drivers do not use this member.
(Read and Write property)

Some examples using this property:

WindowsDeviceModeMBS.MediaType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies the type of media being printed on.

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.

ValueMeaning
DMMEDIA_STANDARDPlain paper.
DMMEDIA_GLOSSYGlossy paper.
DMMEDIA_TRANSPARENCYTransparent film.
(Read and Write property)

WindowsDeviceModeMBS.Nup as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies where the NUP is done.

It can be one of the following.

ValueMeaning
DMNUP_SYSTEMThe print spooler does the NUP.
DMNUP_ONEUPThe application does the NUP.
(Read and Write property)

WindowsDeviceModeMBS.Orientation as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
For printer devices only, selects the orientation of the paper.
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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
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.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
For printer devices only, selects the size of the paper to print on.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
For printer devices only, overrides the width of the paper specified by the PaperSize member.

Unit is tenths of a millimeter.
(Read and Write property)

Some examples using this property:

WindowsDeviceModeMBS.PrintQuality as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies the printer resolution.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies the factor by which the printed output is to be scaled.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members.

You don't need to set this field normally as the plugin does that for you.
(Read and Write property)

WindowsDeviceModeMBS.SpecVersion as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The version number of the initialization data specification on which the structure is based.

You don't need to set this field normally as the plugin does that for you.
(Read and Write property)

WindowsDeviceModeMBS.TTOption as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies how TrueType fonts should be printed.

This member can be one of the following values:
ValueMeaning
DMTT_BITMAPPrints TrueType fonts as graphics. This is the default action for dot-matrix printers.
DMTT_DOWNLOADDownloads 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_SUBDEVSubstitutes device fonts for TrueType fonts. This is the default action for PostScript printers.
(Read and Write property)

Some examples using this property:

WindowsDeviceModeMBS.YResolution as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Specifies the y-resolution, in dots per inch, of the printer.

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.


The biggest plugin in space...