Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

DEVMODE (Structures)
 
.
Summary
Contains information about the initialization and environment of a printer or a display device.

C# Definition:

public struct DEVMODE
{
    [MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)] public string dmDeviceName;
    public short  dmSpecVersion;
    public short  dmDriverVersion;
    public short  dmSize;
    public short  dmDriverExtra;
    public int    dmFields;

    public short dmOrientation;
    public short dmPaperSize;
    public short dmPaperLength;
    public short dmPaperWidth;

    public short dmScale;
    public short dmCopies;
    public short dmDefaultSource;
    public short dmPrintQuality;
    public short dmColor;
    public short dmDuplex;
    public short dmYResolution;
    public short dmTTOption;
    public short dmCollate;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmFormName;
    public short dmLogPixels;
    public short dmBitsPerPel;
    public int   dmPelsWidth;
    public int   dmPelsHeight;

    public int   dmDisplayFlags;
    public int   dmDisplayFrequency;

    public int   dmICMMethod;
    public int   dmICMIntent;
    public int   dmMediaType;
    public int   dmDitherType;
    public int   dmReserved1;
    public int   dmReserved2;

    public int   dmPanningWidth;
    public int   dmPanningHeight;
};

VB Definition:

    <StructLayout(LayoutKind.Sequential)> Public Structure DEVMODE
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public dmDeviceName As String
    Public dmSpecVersion As Integer
    Public dmDriverVersion As Integer
    Public dmSize As Integer
    Public dmDriverExtra As Integer
    Public dmFields As Integer
    Public dmOrientation As Integer
    Public dmPaperSize As Integer
    Public dmPaperLength As Integer
    Public dmPaperWidth As Integer
    Public dmScale As Integer
    Public dmCopies As Integer
    Public dmDefaultSource As Integer
    Public dmPrintQuality As Integer
    Public dmColor As Integer
    Public dmDuplex As Integer
    Public dmYResolution As Integer
    Public dmTTOption As Integer
    Public dmCollate As Integer
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public dmFormName As String
    Public dmUnusedPadding As Integer
    Public dmBitsPerPel As Integer
    Public dmPelsWidth As Integer
    Public dmPelsHeight As Integer
    Public dmDisplayFlags As Integer
    Public dmDisplayFrequency As Integer
    End Structure

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
DEVMODE on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions