using System; using System.Runtime.InteropServices; namespace Vanara.PInvoke { /// Specifies whether collation should be used when printing multiple copies. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMCOLLATE : short { /// Do NOT collate when printing multiple copies. DMCOLLATE_FALSE = 0, /// Collate when printing multiple copies. DMCOLLATE_TRUE = 1 } /// The printer color. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMCOLOR : short { /// Monochrome. DMCOLOR_MONOCHROME = 1, /// Color. DMCOLOR_COLOR = 2 } /// How the display presents a low-resolution mode on a higher-resolution display. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMDFO : uint { /// The display's default setting. DMDFO_DEFAULT = 0, /// The low-resolution image is stretched to fill the larger screen space. DMDFO_STRETCH = 1, /// The low-resolution image is centered in the larger screen space. DMDFO_CENTER = 2, } /// Specifies the device's display mode. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMDISPLAY : uint { /// Specifies that the display is a noncolor device. If this flag is not set, color is assumed. DM_GRAYSCALE = 0x00000001, /// Specifies that the display mode is interlaced. If the flag is not set, noninterlaced is assumed. DM_INTERLACED = 0x00000002, /// Undocumented DMDISPLAYFLAGS_TEXTMODE = 0x00000004, } /// Specifies how dithering is to be done. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMDITHER : uint { /// No dithering. DMDITHER_NONE = 1, /// Dithering with a coarse brush. DMDITHER_COARSE = 2, /// Dithering with a fine brush. DMDITHER_FINE = 3, /// /// 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_LINEART = 4, /// Dithering with error diffusion. DMDITHER_ERRORDIFFUSION = 5, /// Reserved DMDITHER_RESERVED6 = 6, /// Reserved DMDITHER_RESERVED7 = 7, /// Reserved DMDITHER_RESERVED8 = 8, /// Reserved DMDITHER_RESERVED9 = 9, /// Device does gray scaling. DMDITHER_GRAYSCALE = 10, /// Base for driver-defined values. DMDITHER_USER = 256, } /// The orientation at which images should be presented. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMDO : uint { /// The display orientation is the natural orientation of the display device; it should be used as the default. DMDO_DEFAULT = 0, /// The display orientation is rotated 90 degrees (measured clockwise) from DMDO_DEFAULT. DMDO_90 = 1, /// The display orientation is rotated 180 degrees (measured clockwise) from DMDO_DEFAULT. DMDO_180 = 2, /// The display orientation is rotated 270 degrees (measured clockwise) from DMDO_DEFAULT. DMDO_270 = 3, } /// Selects duplex or double-sided printing for printers capable of duplex printing. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMDUP : short { /// Unknown setting. DMDUP_UNKNOWN = 0, /// Normal (nonduplex) printing. DMDUP_SIMPLEX = 1, /// Long-edge binding, that is, the long edge of the page is vertical. DMDUP_VERTICAL = 2, /// Short-edge binding, that is, the long edge of the page is horizontal. DMDUP_HORIZONTAL = 3, } /// Specifies whether certain members of the DEVMODE structure have been initialized. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] [Flags] public enum DMFIELDS : uint { /// DM_ORIENTATION = 0x00000001, /// DM_PAPERSIZE = 0x00000002, /// DM_PAPERLENGTH = 0x00000004, /// DM_PAPERWIDTH = 0x00000008, /// DM_SCALE = 0x00000010, /// DM_POSITION = 0x00000020, /// DM_NUP = 0x00000040, /// DM_DISPLAYORIENTATION = 0x00000080, /// DM_COPIES = 0x00000100, /// DM_DEFAULTSOURCE = 0x00000200, /// DM_PRINTQUALITY = 0x00000400, /// DM_COLOR = 0x00000800, /// DM_DUPLEX = 0x00001000, /// DM_YRESOLUTION = 0x00002000, /// DM_TTOPTION = 0x00004000, /// DM_COLLATE = 0x00008000, /// DM_FORMNAME = 0x00010000, /// DM_LOGPIXELS = 0x00020000, /// DM_BITSPERPEL = 0x00040000, /// DM_PELSWIDTH = 0x00080000, /// DM_PELSHEIGHT = 0x00100000, /// DM_DISPLAYFLAGS = 0x00200000, /// DM_DISPLAYFREQUENCY = 0x00400000, /// DM_ICMMETHOD = 0x00800000, /// DM_ICMINTENT = 0x01000000, /// DM_MEDIATYPE = 0x02000000, /// DM_DITHERTYPE = 0x04000000, /// DM_PANNINGWIDTH = 0x08000000, /// DM_PANNINGHEIGHT = 0x10000000, /// DM_DISPLAYFIXEDOUTPUT = 0x20000000, } /// /// 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. /// [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMICM : uint { /// /// Color matching should optimize for color saturation. This value is the most appropriate choice for business graphs when /// dithering is not desired. /// DMICM_SATURATE = 1, /// /// Color matching should optimize for color contrast. This value is the most appropriate choice for scanned or photographic /// images when dithering is desired. /// DMICM_CONTRAST = 2, /// /// 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_COLORIMETRIC = 3, /// /// Color matching should optimize to match the exact color requested without white point mapping. This value is most appropriate /// for use with proofing. /// DMICM_ABS_COLORIMETRIC = 4, /// Base for driver-defined values. DMICM_USER = 256, } /// /// 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. /// [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMICMMETHOD : uint { /// Specifies that ICM is disabled. DMICMMETHOD_NONE = 1, /// Specifies that ICM is handled by Windows. DMICMMETHOD_SYSTEM = 2, /// Specifies that ICM is handled by the device driver. DMICMMETHOD_DRIVER = 3, /// Specifies that ICM is handled by the destination device. DMICMMETHOD_DEVICE = 4, /// Base for driver-defined values. DMICMMETHOD_USER = 256, } /// Specifies the type of media being printed on. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMMEDIA : uint { /// Plain paper. DMMEDIA_STANDARD = 1, /// Transparent film. DMMEDIA_TRANSPARENCY = 2, /// Glossy paper. DMMEDIA_GLOSSY = 3, /// Base for driver-defined values. DMMEDIA_USER = 256, } /// Specifies where the NUP is done. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMNUP : uint { /// The print spooler does the NUP. DMNUP_SYSTEM = 1, /// The application does the NUP. DMNUP_ONEUP = 2 } /// The orientation of the paper. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMORIENT : short { /// Portrait DMORIENT_PORTRAIT = 1, /// Landscape DMORIENT_LANDSCAPE = 2 } /// The size of the paper to print on. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMPAPER : short { /// Letter 8 1/2 x 11 in DMPAPER_LETTER = 1, /// Letter Small 8 1/2 x 11 in DMPAPER_LETTERSMALL = 2, /// Tabloid 11 x 17 in DMPAPER_TABLOID = 3, /// Ledger 17 x 11 in DMPAPER_LEDGER = 4, /// Legal 8 1/2 x 14 in DMPAPER_LEGAL = 5, /// Statement 5 1/2 x 8 1/2 in DMPAPER_STATEMENT = 6, /// Executive 7 1/4 x 10 1/2 in DMPAPER_EXECUTIVE = 7, /// A3 297 x 420 mm DMPAPER_A3 = 8, /// A4 210 x 297 mm DMPAPER_A4 = 9, /// A4 Small 210 x 297 mm DMPAPER_A4SMALL = 10, /// A5 148 x 210 mm DMPAPER_A5 = 11, /// B4 (JIS) 250 x 354 DMPAPER_B4 = 12, /// B5 (JIS) 182 x 257 mm DMPAPER_B5 = 13, /// Folio 8 1/2 x 13 in DMPAPER_FOLIO = 14, /// Quarto 215 x 275 mm DMPAPER_QUARTO = 15, /// 10x14 in DMPAPER_10X14 = 16, /// 11x17 in DMPAPER_11X17 = 17, /// Note 8 1/2 x 11 in DMPAPER_NOTE = 18, /// Envelope #9 3 7/8 x 8 7/8 DMPAPER_ENV_9 = 19, /// Envelope #10 4 1/8 x 9 1/2 DMPAPER_ENV_10 = 20, /// Envelope #11 4 1/2 x 10 3/8 DMPAPER_ENV_11 = 21, /// Envelope #12 4 \276 x 11 DMPAPER_ENV_12 = 22, /// Envelope #14 5 x 11 1/2 DMPAPER_ENV_14 = 23, /// C size sheet DMPAPER_CSHEET = 24, /// D size sheet DMPAPER_DSHEET = 25, /// E size sheet DMPAPER_ESHEET = 26, /// Envelope DL 110 x 220mm DMPAPER_ENV_DL = 27, /// Envelope C5 162 x 229 mm DMPAPER_ENV_C5 = 28, /// Envelope C3 324 x 458 mm DMPAPER_ENV_C3 = 29, /// Envelope C4 229 x 324 mm DMPAPER_ENV_C4 = 30, /// Envelope C6 114 x 162 mm DMPAPER_ENV_C6 = 31, /// Envelope C65 114 x 229 mm DMPAPER_ENV_C65 = 32, /// Envelope B4 250 x 353 mm DMPAPER_ENV_B4 = 33, /// Envelope B5 176 x 250 mm DMPAPER_ENV_B5 = 34, /// Envelope B6 176 x 125 mm DMPAPER_ENV_B6 = 35, /// Envelope 110 x 230 mm DMPAPER_ENV_ITALY = 36, /// Envelope Monarch 3.875 x 7.5 in DMPAPER_ENV_MONARCH = 37, /// 6 3/4 Envelope 3 5/8 x 6 1/2 in DMPAPER_ENV_PERSONAL = 38, /// US Std Fanfold 14 7/8 x 11 in DMPAPER_FANFOLD_US = 39, /// German Std Fanfold 8 1/2 x 12 in DMPAPER_FANFOLD_STD_GERMAN = 40, /// German Legal Fanfold 8 1/2 x 13 in DMPAPER_FANFOLD_LGL_GERMAN = 41, /// B4 (ISO) 250 x 353 mm DMPAPER_ISO_B4 = 42, /// Japanese Postcard 100 x 148 mm DMPAPER_JAPANESE_POSTCARD = 43, /// 9 x 11 in DMPAPER_9X11 = 44, /// 10 x 11 in DMPAPER_10X11 = 45, /// 15 x 11 in DMPAPER_15X11 = 46, /// Envelope Invite 220 x 220 mm DMPAPER_ENV_INVITE = 47, /// RESERVED--DO NOT USE DMPAPER_RESERVED_48 = 48, /// RESERVED--DO NOT USE DMPAPER_RESERVED_49 = 49, /// Letter Extra 9 \275 x 12 in DMPAPER_LETTER_EXTRA = 50, /// Legal Extra 9 \275 x 15 in DMPAPER_LEGAL_EXTRA = 51, /// Tabloid Extra 11.69 x 18 in DMPAPER_TABLOID_EXTRA = 52, /// A4 Extra 9.27 x 12.69 in DMPAPER_A4_EXTRA = 53, /// Letter Transverse 8 \275 x 11 in DMPAPER_LETTER_TRANSVERSE = 54, /// A4 Transverse 210 x 297 mm DMPAPER_A4_TRANSVERSE = 55, /// Letter Extra Transverse 9\275 x 12 in DMPAPER_LETTER_EXTRA_TRANSVERSE = 56, /// SuperA/SuperA/A4 227 x 356 mm DMPAPER_A_PLUS = 57, /// SuperB/SuperB/A3 305 x 487 mm DMPAPER_B_PLUS = 58, /// Letter Plus 8.5 x 12.69 in DMPAPER_LETTER_PLUS = 59, /// A4 Plus 210 x 330 mm DMPAPER_A4_PLUS = 60, /// A5 Transverse 148 x 210 mm DMPAPER_A5_TRANSVERSE = 61, /// B5 (JIS) Transverse 182 x 257 mm DMPAPER_B5_TRANSVERSE = 62, /// A3 Extra 322 x 445 mm DMPAPER_A3_EXTRA = 63, /// A5 Extra 174 x 235 mm DMPAPER_A5_EXTRA = 64, /// B5 (ISO) Extra 201 x 276 mm DMPAPER_B5_EXTRA = 65, /// A2 420 x 594 mm DMPAPER_A2 = 66, /// A3 Transverse 297 x 420 mm DMPAPER_A3_TRANSVERSE = 67, /// A3 Extra Transverse 322 x 445 mm DMPAPER_A3_EXTRA_TRANSVERSE = 68, /// Japanese Double Postcard 200 x 148 mm DMPAPER_DBL_JAPANESE_POSTCARD = 69, /// A6 105 x 148 mm DMPAPER_A6 = 70, /// Japanese Envelope Kaku #2 DMPAPER_JENV_KAKU2 = 71, /// Japanese Envelope Kaku #3 DMPAPER_JENV_KAKU3 = 72, /// Japanese Envelope Chou #3 DMPAPER_JENV_CHOU3 = 73, /// Japanese Envelope Chou #4 DMPAPER_JENV_CHOU4 = 74, /// Letter Rotated 11 x 8 1/2 11 in DMPAPER_LETTER_ROTATED = 75, /// A3 Rotated 420 x 297 mm DMPAPER_A3_ROTATED = 76, /// A4 Rotated 297 x 210 mm DMPAPER_A4_ROTATED = 77, /// A5 Rotated 210 x 148 mm DMPAPER_A5_ROTATED = 78, /// B4 (JIS) Rotated 364 x 257 mm DMPAPER_B4_JIS_ROTATED = 79, /// B5 (JIS) Rotated 257 x 182 mm DMPAPER_B5_JIS_ROTATED = 80, /// Japanese Postcard Rotated 148 x 100 mm DMPAPER_JAPANESE_POSTCARD_ROTATED = 81, /// Double Japanese Postcard Rotated 148 x 200 mm DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 82, /// A6 Rotated 148 x 105 mm DMPAPER_A6_ROTATED = 83, /// Japanese Envelope Kaku #2 Rotated DMPAPER_JENV_KAKU2_ROTATED = 84, /// Japanese Envelope Kaku #3 Rotated DMPAPER_JENV_KAKU3_ROTATED = 85, /// Japanese Envelope Chou #3 Rotated DMPAPER_JENV_CHOU3_ROTATED = 86, /// Japanese Envelope Chou #4 Rotated DMPAPER_JENV_CHOU4_ROTATED = 87, /// B6 (JIS) 128 x 182 mm DMPAPER_B6_JIS = 88, /// B6 (JIS) Rotated 182 x 128 mm DMPAPER_B6_JIS_ROTATED = 89, /// 12 x 11 in DMPAPER_12X11 = 90, /// Japanese Envelope You #4 DMPAPER_JENV_YOU4 = 91, /// Japanese Envelope You #4 Rotated DMPAPER_JENV_YOU4_ROTATED = 92, /// PRC 16K 146 x 215 mm DMPAPER_P16K = 93, /// PRC 32K 97 x 151 mm DMPAPER_P32K = 94, /// PRC 32K(Big) 97 x 151 mm DMPAPER_P32KBIG = 95, /// PRC Envelope #1 102 x 165 mm DMPAPER_PENV_1 = 96, /// PRC Envelope #2 102 x 176 mm DMPAPER_PENV_2 = 97, /// PRC Envelope #3 125 x 176 mm DMPAPER_PENV_3 = 98, /// PRC Envelope #4 110 x 208 mm DMPAPER_PENV_4 = 99, /// PRC Envelope #5 110 x 220 mm DMPAPER_PENV_5 = 100, /// PRC Envelope #6 120 x 230 mm DMPAPER_PENV_6 = 101, /// PRC Envelope #7 160 x 230 mm DMPAPER_PENV_7 = 102, /// PRC Envelope #8 120 x 309 mm DMPAPER_PENV_8 = 103, /// PRC Envelope #9 229 x 324 mm DMPAPER_PENV_9 = 104, /// PRC Envelope #10 324 x 458 mm DMPAPER_PENV_10 = 105, /// PRC 16K Rotated DMPAPER_P16K_ROTATED = 106, /// PRC 32K Rotated DMPAPER_P32K_ROTATED = 107, /// PRC 32K(Big) Rotated DMPAPER_P32KBIG_ROTATED = 108, /// PRC Envelope #1 Rotated 165 x 102 mm DMPAPER_PENV_1_ROTATED = 109, /// PRC Envelope #2 Rotated 176 x 102 mm DMPAPER_PENV_2_ROTATED = 110, /// PRC Envelope #3 Rotated 176 x 125 mm DMPAPER_PENV_3_ROTATED = 111, /// PRC Envelope #4 Rotated 208 x 110 mm DMPAPER_PENV_4_ROTATED = 112, /// PRC Envelope #5 Rotated 220 x 110 mm DMPAPER_PENV_5_ROTATED = 113, /// PRC Envelope #6 Rotated 230 x 120 mm DMPAPER_PENV_6_ROTATED = 114, /// PRC Envelope #7 Rotated 230 x 160 mm DMPAPER_PENV_7_ROTATED = 115, /// PRC Envelope #8 Rotated 309 x 120 mm DMPAPER_PENV_8_ROTATED = 116, /// PRC Envelope #9 Rotated 324 x 229 mm DMPAPER_PENV_9_ROTATED = 117, /// PRC Envelope #10 Rotated 458 x 324 mm DMPAPER_PENV_10_ROTATED = 118, /// User-defined lower bounds. DMPAPER_USER = 256, } /// The printer resolution. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMRES : short { /// Use draft resolution (96 DPI). DMRES_DRAFT = -1, /// Use low resolution (150 DPI). DMRES_LOW = -2, /// Use medium resolution (300 DPI). DMRES_MEDIUM = -3, /// Use high resolution (600 DPI). DMRES_HIGH = -4, } /// Specifies how TrueType fonts should be printed. [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] public enum DMTT : short { /// Prints TrueType fonts as graphics. This is the default action for dot-matrix printers. DMTT_BITMAP = 1, /// /// Downloads TrueType fonts as soft fonts. This is the default action for Hewlett-Packard printers that use Printer Control /// Language (PCL). /// DMTT_DOWNLOAD = 2, /// Substitute device fonts for TrueType fonts. This is the default action for PostScript printers. DMTT_SUBDEV = 3, /// Downloads TrueType fonts as outline soft fonts. DMTT_DOWNLOAD_OUTLINE = 4 } /// /// The DEVMODE data structure contains information about the initialization and environment of a printer or a display device. /// /// /// A device driver's private data follows the public portion of the DEVMODE structure. The size of the public data can vary /// for different versions of the structure. The dmSize member specifies the number of bytes of public data, and the /// dmDriverExtra member specifies the number of bytes of private data. /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/ns-wingdi-_devicemodea typedef struct _devicemodeA { BYTE // dmDeviceName[CCHDEVICENAME]; WORD dmSpecVersion; WORD dmDriverVersion; WORD dmSize; WORD dmDriverExtra; DWORD dmFields; union { // struct { short dmOrientation; short dmPaperSize; short dmPaperLength; short dmPaperWidth; short dmScale; short dmCopies; short // dmDefaultSource; short dmPrintQuality; } DUMMYSTRUCTNAME; POINTL dmPosition; struct { POINTL dmPosition; DWORD // dmDisplayOrientation; DWORD dmDisplayFixedOutput; } DUMMYSTRUCTNAME2; } DUMMYUNIONNAME; short dmColor; short dmDuplex; short // dmYResolution; short dmTTOption; short dmCollate; BYTE dmFormName[CCHFORMNAME]; WORD dmLogPixels; DWORD dmBitsPerPel; DWORD // dmPelsWidth; DWORD dmPelsHeight; union { DWORD dmDisplayFlags; DWORD dmNup; } DUMMYUNIONNAME2; DWORD dmDisplayFrequency; DWORD // dmICMMethod; DWORD dmICMIntent; DWORD dmMediaType; DWORD dmDitherType; DWORD dmReserved1; DWORD dmReserved2; DWORD dmPanningWidth; // DWORD dmPanningHeight; } DEVMODEA, *PDEVMODEA, *NPDEVMODEA, *LPDEVMODEA; [PInvokeData("wingdi.h", MSDNShortId = "85741025-9393-42ab-8a6d-27f1ae2c0f1b")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DEVMODE { /// Version for XP and later. public const ushort DM_SPECVERSION = 0x0401; /// /// A zero-terminated character array 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 array. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmDeviceName; /// /// The version number of the initialization data specification on which the structure is based. To ensure the correct version is /// used for any operating system, use DM_SPECVERSION. /// public ushort dmSpecVersion; /// The driver version number assigned by the driver developer. public ushort dmDriverVersion; /// /// Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might /// follow the structure's public members. Set this member to to indicate the version of the DEVMODE structure being used. /// public ushort dmSize; /// /// 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. /// public ushort dmDriverExtra; /// /// /// Specifies whether certain members of the DEVMODE structure have been initialized. If a member is initialized, its /// corresponding bit is set, otherwise the bit is clear. A driver supports only those DEVMODE members that are /// appropriate for the printer or display technology. /// /// The following values are defined, and are listed here with the corresponding structure members. /// /// /// Value /// Structure member /// /// /// DM_ORIENTATION /// dmOrientation /// /// /// DM_PAPERSIZE /// dmPaperSize /// /// /// DM_PAPERLENGTH /// dmPaperLength /// /// /// DM_PAPERWIDTH /// dmPaperWidth /// /// /// DM_SCALE /// dmScale /// /// /// DM_COPIES /// dmCopies /// /// /// DM_DEFAULTSOURCE /// dmDefaultSource /// /// /// DM_PRINTQUALITY /// dmPrintQuality /// /// /// DM_POSITION /// dmPosition /// /// /// DM_DISPLAYORIENTATION /// dmDisplayOrientation /// /// /// DM_DISPLAYFIXEDOUTPUT /// dmDisplayFixedOutput /// /// /// DM_COLOR /// dmColor /// /// /// DM_DUPLEX /// dmDuplex /// /// /// DM_YRESOLUTION /// dmYResolution /// /// /// DM_TTOPTION /// dmTTOption /// /// /// DM_COLLATE /// dmCollate /// /// /// DM_FORMNAME /// dmFormName /// /// /// DM_LOGPIXELS /// dmLogPixels /// /// /// DM_BITSPERPEL /// dmBitsPerPel /// /// /// DM_PELSWIDTH /// dmPelsWidth /// /// /// DM_PELSHEIGHT /// dmPelsHeight /// /// /// DM_DISPLAYFLAGS /// dmDisplayFlags /// /// /// DM_NUP /// dmNup /// /// /// DM_DISPLAYFREQUENCY /// dmDisplayFrequency /// /// /// DM_ICMMETHOD /// dmICMMethod /// /// /// DM_ICMINTENT /// dmICMIntent /// /// /// DM_MEDIATYPE /// dmMediaType /// /// /// DM_DITHERTYPE /// dmDitherType /// /// /// DM_PANNINGWIDTH /// dmPanningWidth /// /// /// DM_PANNINGHEIGHT /// dmPanningHeight /// /// /// public DMFIELDS dmFields; /// DUMMYUNIONNAME private DEVMODE_U1 Union; [StructLayout(LayoutKind.Explicit)] private struct DEVMODE_U1 { [FieldOffset(0)] public DMORIENT dmOrientation; [FieldOffset(2)] public DMPAPER dmPaperSize; [FieldOffset(4)] public short dmPaperLength; [FieldOffset(6)] public short dmPaperWidth; [FieldOffset(8)] public short dmScale; [FieldOffset(10)] public short dmCopies; [FieldOffset(12)] public short dmDefaultSource; [FieldOffset(14)] public DMRES dmPrintQuality; [FieldOffset(0)] public POINT dmPosition; [FieldOffset(8)] public DMDO dmDisplayOrientation; [FieldOffset(12)] public DMDFO dmDisplayFixedOutput; } /// /// For printer devices only, selects the orientation of the paper. This member can be either DMORIENT_PORTRAIT (1) or /// DMORIENT_LANDSCAPE (2). /// public DMORIENT dmOrientation { get => Union.dmOrientation; set => Union.dmOrientation = value; } /// /// /// 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 dmPaperLength and dmPaperWidth members. Otherwise, the dmPaperSize /// member can be set to a device specific value greater than or equal to DMPAPER_USER or to one of the following predefined values. /// /// /// /// Value /// Meaning /// /// /// DMPAPER_LETTER /// Letter, 8 1/2- by 11-inches /// /// /// DMPAPER_LEGAL /// Legal, 8 1/2- by 14-inches /// /// /// DMPAPER_9X11 /// 9- by 11-inch sheet /// /// /// DMPAPER_10X11 /// 10- by 11-inch sheet /// /// /// DMPAPER_10X14 /// 10- by 14-inch sheet /// /// /// DMPAPER_15X11 /// 15- by 11-inch sheet /// /// /// DMPAPER_11X17 /// 11- by 17-inch sheet /// /// /// DMPAPER_12X11 /// 12- by 11-inch sheet /// /// /// DMPAPER_A2 /// A2 sheet, 420 x 594-millimeters /// /// /// DMPAPER_A3 /// A3 sheet, 297- by 420-millimeters /// /// /// DMPAPER_A3_EXTRA /// A3 Extra 322 x 445-millimeters /// /// /// DMPAPER_A3_EXTRA_TRAVERSE /// A3 Extra Transverse 322 x 445-millimeters /// /// /// DMPAPER_A3_ROTATED /// A3 rotated sheet, 420- by 297-millimeters /// /// /// DMPAPER_A3_TRAVERSE /// A3 Transverse 297 x 420-millimeters /// /// /// DMPAPER_A4 /// A4 sheet, 210- by 297-millimeters /// /// /// DMPAPER_A4_EXTRA /// A4 sheet, 9.27 x 12.69 inches /// /// /// DMPAPER_A4_PLUS /// A4 Plus 210 x 330-millimeters /// /// /// DMPAPER_A4_ROTATED /// A4 rotated sheet, 297- by 210-millimeters /// /// /// DMPAPER_A4SMALL /// A4 small sheet, 210- by 297-millimeters /// /// /// DMPAPER_A4_TRANSVERSE /// A4 Transverse 210 x 297 millimeters /// /// /// DMPAPER_A5 /// A5 sheet, 148- by 210-millimeters /// /// /// DMPAPER_A5_EXTRA /// A5 Extra 174 x 235-millimeters /// /// /// DMPAPER_A5_ROTATED /// A5 rotated sheet, 210- by 148-millimeters /// /// /// DMPAPER_A5_TRANSVERSE /// A5 Transverse 148 x 210-millimeters /// /// /// DMPAPER_A6 /// A6 sheet, 105- by 148-millimeters /// /// /// DMPAPER_A6_ROTATED /// A6 rotated sheet, 148- by 105-millimeters /// /// /// DMPAPER_A_PLUS /// SuperA/A4 227 x 356 -millimeters /// /// /// DMPAPER_B4 /// B4 sheet, 250- by 354-millimeters /// /// /// DMPAPER_B4_JIS_ROTATED /// B4 (JIS) rotated sheet, 364- by 257-millimeters /// /// /// DMPAPER_B5 /// B5 sheet, 182- by 257-millimeter paper /// /// /// DMPAPER_B5_EXTRA /// B5 (ISO) Extra 201 x 276-millimeters /// /// /// DMPAPER_B5_JIS_ROTATED /// B5 (JIS) rotated sheet, 257- by 182-millimeters /// /// /// DMPAPER_B6_JIS /// B6 (JIS) sheet, 128- by 182-millimeters /// /// /// DMPAPER_B6_JIS_ROTATED /// B6 (JIS) rotated sheet, 182- by 128-millimeters /// /// /// DMPAPER_B_PLUS /// SuperB/A3 305 x 487-millimeters /// /// /// DMPAPER_CSHEET /// C Sheet, 17- by 22-inches /// /// /// DMPAPER_DBL_JAPANESE_POSTCARD /// Double Japanese Postcard, 200- by 148-millimeters /// /// /// DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED /// Double Japanese Postcard Rotated, 148- by 200-millimeters /// /// /// DMPAPER_DSHEET /// D Sheet, 22- by 34-inches /// /// /// DMPAPER_ENV_9 /// #9 Envelope, 3 7/8- by 8 7/8-inches /// /// /// DMPAPER_ENV_10 /// #10 Envelope, 4 1/8- by 9 1/2-inches /// /// /// DMPAPER_ENV_11 /// #11 Envelope, 4 1/2- by 10 3/8-inches /// /// /// DMPAPER_ENV_12 /// #12 Envelope, 4 3/4- by 11-inches /// /// /// DMPAPER_ENV_14 /// #14 Envelope, 5- by 11 1/2-inches /// /// /// DMPAPER_ENV_C5 /// C5 Envelope, 162- by 229-millimeters /// /// /// DMPAPER_ENV_C3 /// C3 Envelope, 324- by 458-millimeters /// /// /// DMPAPER_ENV_C4 /// C4 Envelope, 229- by 324-millimeters /// /// /// DMPAPER_ENV_C6 /// C6 Envelope, 114- by 162-millimeters /// /// /// DMPAPER_ENV_C65 /// C65 Envelope, 114- by 229-millimeters /// /// /// DMPAPER_ENV_B4 /// B4 Envelope, 250- by 353-millimeters /// /// /// DMPAPER_ENV_B5 /// B5 Envelope, 176- by 250-millimeters /// /// /// DMPAPER_ENV_B6 /// B6 Envelope, 176- by 125-millimeters /// /// /// DMPAPER_ENV_DL /// DL Envelope, 110- by 220-millimeters /// /// /// DMPAPER_ENV_INVITE /// Envelope Invite 220 x 220 mm /// /// /// DMPAPER_ENV_ITALY /// Italy Envelope, 110- by 230-millimeters /// /// /// DMPAPER_ENV_MONARCH /// Monarch Envelope, 3 7/8- by 7 1/2-inches /// /// /// DMPAPER_ENV_PERSONAL /// 6 3/4 Envelope, 3 5/8- by 6 1/2-inches /// /// /// DMPAPER_ESHEET /// E Sheet, 34- by 44-inches /// /// /// DMPAPER_EXECUTIVE /// Executive, 7 1/4- by 10 1/2-inches /// /// /// DMPAPER_FANFOLD_US /// US Std Fanfold, 14 7/8- by 11-inches /// /// /// DMPAPER_FANFOLD_STD_GERMAN /// German Std Fanfold, 8 1/2- by 12-inches /// /// /// DMPAPER_FANFOLD_LGL_GERMAN /// German Legal Fanfold, 8 - by 13-inches /// /// /// DMPAPER_FOLIO /// Folio, 8 1/2- by 13-inch paper /// /// /// DMPAPER_ISO_B4 /// B4 (ISO) 250- by 353-millimeters paper /// /// /// DMPAPER_JAPANESE_POSTCARD /// Japanese Postcard, 100- by 148-millimeters /// /// /// DMPAPER_JAPANESE_POSTCARD_ROTATED /// Japanese Postcard Rotated, 148- by 100-millimeters /// /// /// DMPAPER_JENV_CHOU3 /// Japanese Envelope Chou #3 /// /// /// DMPAPER_JENV_CHOU3_ROTATED /// Japanese Envelope Chou #3 Rotated /// /// /// DMPAPER_JENV_CHOU4 /// Japanese Envelope Chou #4 /// /// /// DMPAPER_JENV_CHOU4_ROTATED /// Japanese Envelope Chou #4 Rotated /// /// /// DMPAPER_JENV_KAKU2 /// Japanese Envelope Kaku #2 /// /// /// DMPAPER_JENV_KAKU2_ROTATED /// Japanese Envelope Kaku #2 Rotated /// /// /// DMPAPER_JENV_KAKU3 /// Japanese Envelope Kaku #3 /// /// /// DMPAPER_JENV_KAKU3_ROTATED /// Japanese Envelope Kaku #3 Rotated /// /// /// DMPAPER_JENV_YOU4 /// Japanese Envelope You #4 /// /// /// DMPAPER_JENV_YOU4_ROTATED /// Japanese Envelope You #4 Rotated /// /// /// DMPAPER_LAST /// DMPAPER_PENV_10_ROTATED /// /// /// DMPAPER_LEDGER /// Ledger, 17- by 11-inches /// /// /// DMPAPER_LEGAL_EXTRA /// Legal Extra 9 1/2 x 15 inches. /// /// /// DMPAPER_LETTER_EXTRA /// Letter Extra 9 1/2 x 12 inches. /// /// /// DMPAPER_LETTER_EXTRA_TRANSVERSE /// Letter Extra Transverse 9 1/2 x 12 inches. /// /// /// DMPAPER_LETTER_ROTATED /// Letter Rotated 11 by 8 1/2 inches /// /// /// DMPAPER_LETTERSMALL /// Letter Small, 8 1/2- by 11-inches /// /// /// DMPAPER_LETTER_TRANSVERSE /// Letter Transverse 8 1/2 x 11-inches /// /// /// DMPAPER_NOTE /// Note, 8 1/2- by 11-inches /// /// /// DMPAPER_P16K /// PRC 16K, 146- by 215-millimeters /// /// /// DMPAPER_P16K_ROTATED /// PRC 16K Rotated, 215- by 146-millimeters /// /// /// DMPAPER_P32K /// PRC 32K, 97- by 151-millimeters /// /// /// DMPAPER_P32K_ROTATED /// PRC 32K Rotated, 151- by 97-millimeters /// /// /// DMPAPER_P32KBIG /// PRC 32K(Big) 97- by 151-millimeters /// /// /// DMPAPER_P32KBIG_ROTATED /// PRC 32K(Big) Rotated, 151- by 97-millimeters /// /// /// DMPAPER_PENV_1 /// PRC Envelope #1, 102- by 165-millimeters /// /// /// DMPAPER_PENV_1_ROTATED /// PRC Envelope #1 Rotated, 165- by 102-millimeters /// /// /// DMPAPER_PENV_2 /// PRC Envelope #2, 102- by 176-millimeters /// /// /// DMPAPER_PENV_2_ROTATED /// PRC Envelope #2 Rotated, 176- by 102-millimeters /// /// /// DMPAPER_PENV_3 /// PRC Envelope #3, 125- by 176-millimeters /// /// /// DMPAPER_PENV_3_ROTATED /// PRC Envelope #3 Rotated, 176- by 125-millimeters /// /// /// DMPAPER_PENV_4 /// PRC Envelope #4, 110- by 208-millimeters /// /// /// DMPAPER_PENV_4_ROTATED /// PRC Envelope #4 Rotated, 208- by 110-millimeters /// /// /// DMPAPER_PENV_5 /// PRC Envelope #5, 110- by 220-millimeters /// /// /// DMPAPER_PENV_5_ROTATED /// PRC Envelope #5 Rotated, 220- by 110-millimeters /// /// /// DMPAPER_PENV_6 /// PRC Envelope #6, 120- by 230-millimeters /// /// /// DMPAPER_PENV_6_ROTATED /// PRC Envelope #6 Rotated, 230- by 120-millimeters /// /// /// DMPAPER_PENV_7 /// PRC Envelope #7, 160- by 230-millimeters /// /// /// DMPAPER_PENV_7_ROTATED /// PRC Envelope #7 Rotated, 230- by 160-millimeters /// /// /// DMPAPER_PENV_8 /// PRC Envelope #8, 120- by 309-millimeters /// /// /// DMPAPER_PENV_8_ROTATED /// PRC Envelope #8 Rotated, 309- by 120-millimeters /// /// /// DMPAPER_PENV_9 /// PRC Envelope #9, 229- by 324-millimeters /// /// /// DMPAPER_PENV_9_ROTATED /// PRC Envelope #9 Rotated, 324- by 229-millimeters /// /// /// DMPAPER_PENV_10 /// PRC Envelope #10, 324- by 458-millimeters /// /// /// DMPAPER_PENV_10_ROTATED /// PRC Envelope #10 Rotated, 458- by 324-millimeters /// /// /// DMPAPER_QUARTO /// Quarto, 215- by 275-millimeter paper /// /// /// DMPAPER_STATEMENT /// Statement, 5 1/2- by 8 1/2-inches /// /// /// DMPAPER_TABLOID /// Tabloid, 11- by 17-inches /// /// /// DMPAPER_TABLOID_EXTRA /// Tabloid, 11.69 x 18-inches /// /// /// public DMPAPER dmPaperSize { get => Union.dmPaperSize; set => Union.dmPaperSize = value; } /// /// For printer devices only, overrides the length of the paper specified by the dmPaperSize 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. /// public short dmPaperLength { get => Union.dmPaperLength; set => Union.dmPaperLength = value; } /// For printer devices only, overrides the width of the paper specified by the dmPaperSize member. public short dmPaperWidth { get => Union.dmPaperWidth; set => Union.dmPaperWidth = value; } /// /// 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 dmScale /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. /// public short dmScale { get => Union.dmScale; set => Union.dmScale = value; } /// Selects the number of copies printed if the device supports multiple-page copies. public short dmCopies { get => Union.dmCopies; set => Union.dmCopies = value; } /// /// /// Specifies the paper source. To retrieve a list of the available paper sources for a printer, use the DeviceCapabilities /// function with the DC_BINS flag. /// /// This member can be one of the following values, or it can be a device-specific value greater than or equal to DMBIN_USER. /// public short dmDefaultSource { get => Union.dmDefaultSource; set => Union.dmDefaultSource = value; } /// /// Specifies the printer resolution. There are four predefined device-independent values: /// If a positive value is specified, it specifies the number of dots per inch (DPI) and is therefore device dependent. /// public DMRES dmPrintQuality { get => Union.dmPrintQuality; set => Union.dmPrintQuality = value; } /// /// For display devices only, a POINTL structure that indicates the positional coordinates of the display device in reference to /// the desktop area. The primary display device is always located at coordinates (0,0). /// public POINT dmPosition { get => Union.dmPosition; set => Union.dmPosition = value; } /// /// /// For display devices only, the orientation at which images should be presented. If DM_DISPLAYORIENTATION is not set, this /// member must be zero. If DM_DISPLAYORIENTATION is set, this member must be one of the following values /// /// /// /// Value /// Meaning /// /// /// DMDO_DEFAULT /// The display orientation is the natural orientation of the display device; it should be used as the default. /// /// /// DMDO_90 /// The display orientation is rotated 90 degrees (measured clockwise) from DMDO_DEFAULT. /// /// /// DMDO_180 /// The display orientation is rotated 180 degrees (measured clockwise) from DMDO_DEFAULT. /// /// /// DMDO_270 /// The display orientation is rotated 270 degrees (measured clockwise) from DMDO_DEFAULT. /// /// /// /// To determine whether the display orientation is portrait or landscape orientation, check the ratio of dmPelsWidth to dmPelsHeight. /// /// Windows 2000: Not supported. /// public DMDO dmDisplayOrientation { get => Union.dmDisplayOrientation; set => Union.dmDisplayOrientation = value; } /// /// /// For fixed-resolution display devices only, how the display presents a low-resolution mode on a higher-resolution display. For /// example, if a display device's resolution is fixed at 1024 x 768 pixels but its mode is set to 640 x 480 pixels, the device /// can either display a 640 x 480 image somewhere in the interior of the 1024 x 768 screen space or stretch the 640 x 480 image /// to fill the larger screen space. If DM_DISPLAYFIXEDOUTPUT is not set, this member must be zero. If DM_DISPLAYFIXEDOUTPUT is /// set, this member must be one of the following values. /// /// /// /// Value /// Meaning /// /// /// DMDFO_DEFAULT /// The display's default setting. /// /// /// DMDFO_CENTER /// The low-resolution image is centered in the larger screen space. /// /// /// DMDFO_STRETCH /// The low-resolution image is stretched to fill the larger screen space. /// /// /// Windows 2000: Not supported. /// public DMDFO dmDisplayFixedOutput { get => Union.dmDisplayFixedOutput; set => Union.dmDisplayFixedOutput = value; } /// /// Switches between color and monochrome on color printers. The following are the possible values: /// /// /// DMCOLOR_COLOR /// /// /// DMCOLOR_MONOCHROME /// /// /// public DMCOLOR dmColor; /// /// Selects duplex or double-sided printing for printers capable of duplex printing. 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. /// /// /// public DMDUP dmDuplex; /// /// Specifies the y-resolution, in dots per inch, of the printer. If the printer initializes this member, the /// dmPrintQuality member specifies the x-resolution, in dots per inch, of the printer. /// public short dmYResolution; /// /// Specifies how TrueType fonts should be printed. 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. /// /// /// public DMTT dmTTOption; /// /// /// 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. /// /// /// /// Value /// Meaning /// /// /// DMCOLLATE_TRUE /// Collate when printing multiple copies. /// /// /// DMCOLLATE_FALSE /// Do not collate when printing multiple copies. /// /// /// public DMCOLLATE dmCollate; /// /// A zero-terminated character 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 EnumForms function. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmFormName; /// The number of pixels per logical inch. Printer drivers do not use this member. public ushort dmLogPixels; /// /// Specifies the color resolution, in bits per pixel, of the display device (for example: 4 bits for 16 colors, 8 bits for 256 /// colors, or 16 bits for 65,536 colors). Display drivers use this member, for example, in the ChangeDisplaySettings function. /// Printer drivers do not use this member. /// public uint dmBitsPerPel; /// /// Specifies the width, in pixels, of the visible device surface. Display drivers use this member, for example, in the /// ChangeDisplaySettings function. Printer drivers do not use this member. /// public uint dmPelsWidth; /// /// Specifies the height, in pixels, of the visible device surface. Display drivers use this member, for example, in the /// ChangeDisplaySettings function. Printer drivers do not use this member. /// public uint dmPelsHeight; /// DUMMYUNIONNAME2 private DEVMODE_U2 Union2; [StructLayout(LayoutKind.Explicit)] private struct DEVMODE_U2 { [FieldOffset(0)] public DMDISPLAY dmDisplayFlags; [FieldOffset(0)] public DMNUP dmNup; } /// /// Specifies the device's display mode. This member can be a combination of the following values. /// /// /// Value /// Meaning /// /// /// DM_GRAYSCALE /// Specifies that the display is a noncolor device. If this flag is not set, color is assumed. /// /// /// DM_INTERLACED /// Specifies that the display mode is interlaced. If the flag is not set, noninterlaced is assumed. /// /// /// /// Display drivers use this member, for example, in the ChangeDisplaySettings function. Printer drivers do not use this member. /// /// public DMDISPLAY dmDisplayFlags { get => Union2.dmDisplayFlags; set => Union2.dmDisplayFlags = value; } /// /// Specifies where the NUP is done. It can be one of the following. /// /// /// Value /// Meaning /// /// /// DMNUP_SYSTEM /// The print spooler does the NUP. /// /// /// DMNUP_ONEUP /// The application does the NUP. /// /// /// public DMNUP dmNup { get => Union2.dmNup; set => Union2.dmNup = value; } /// /// /// Specifies the frequency, in hertz (cycles per second), of the display device in a particular mode. This value is also known /// as the display device's vertical refresh rate. Display drivers use this member. It is used, for example, in the /// ChangeDisplaySettings function. Printer drivers do not use this member. /// /// /// When you call the EnumDisplaySettings function, the dmDisplayFrequency member may return with the value 0 or 1. These /// values represent the display hardware's default refresh rate. This default rate is typically set by switches on a display /// card or computer motherboard, or by a configuration program that does not use display functions such as ChangeDisplaySettings. /// /// public uint dmDisplayFrequency; /// /// /// 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. /// /// /// /// 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. /// /// public DMICMMETHOD dmICMMethod; /// /// /// 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. /// /// /// /// 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. /// /// /// /// public DMICM dmICMIntent; /// /// /// 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. /// /// /// /// Value /// Meaning /// /// /// DMMEDIA_STANDARD /// Plain paper. /// /// /// DMMEDIA_GLOSSY /// Glossy paper. /// /// /// DMMEDIA_TRANSPARENCY /// Transparent film. /// /// /// /// To retrieve a list of the available media types for a printer, use the DeviceCapabilities function with the DC_MEDIATYPES flag. /// /// public DMMEDIA dmMediaType; /// /// /// 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. /// /// /// /// 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. /// /// /// public DMDITHER dmDitherType; /// Not used; must be zero. public uint dmReserved1; /// Not used; must be zero. public uint dmReserved2; /// This member must be zero. public uint dmPanningWidth; /// This member must be zero. public uint dmPanningHeight; /// A default value with dmSize and dmSpecVersion set. public static readonly DEVMODE Default = new DEVMODE { dmSize = (ushort)Marshal.SizeOf(typeof(DEVMODE)), dmSpecVersion = DM_SPECVERSION }; } }