public int GetPixelHeight() { DEVMODE devmode = new DEVMODE(); devmode.dmSize = Marshal.SizeOf(devmode); WindowsAPI.EnumDisplaySettings( name, CommonConst.ENUM_CURRENT_SETTINGS, ref devmode); return devmode.dmPelsHeight; }
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; }
public int GetDisplayFrequency() { DEVMODE devmode = new DEVMODE(); devmode.dmSize = Marshal.SizeOf(devmode); WindowsAPI.EnumDisplaySettings( name, CommonConst.ENUM_CURRENT_SETTINGS, ref devmode); return devmode.dmDisplayFrequency; }
public static extern bool EnumDisplaySettings(string lpszDeviceName, int iModeNum, ref DEVMODE lpDevMode);