Example #1
0
 public int GetPixelHeight()
 {
     DEVMODE devmode = new DEVMODE();
     devmode.dmSize = Marshal.SizeOf(devmode);
     WindowsAPI.EnumDisplaySettings(
         name,
         CommonConst.ENUM_CURRENT_SETTINGS,
         ref devmode);
     return devmode.dmPelsHeight;
 }
Example #2
0
 public int GetMonitorLeft()
 {
     DEVMODE devmode = new DEVMODE();
     devmode.dmSize = Marshal.SizeOf(devmode);
     WindowsAPI.EnumDisplaySettings(
         name,
         CommonConst.ENUM_CURRENT_SETTINGS,
         ref devmode);
     return (int)devmode.dmPosition.X;
 }
Example #3
0
 public int GetDisplayFrequency()
 {
     DEVMODE devmode = new DEVMODE();
     devmode.dmSize = Marshal.SizeOf(devmode);
     WindowsAPI.EnumDisplaySettings(
         name,
         CommonConst.ENUM_CURRENT_SETTINGS,
         ref devmode);
     return devmode.dmDisplayFrequency;
 }
Example #4
0
 public static extern bool EnumDisplaySettings(string lpszDeviceName, int iModeNum, ref DEVMODE lpDevMode);