33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace FullscreenEditor.Windows {
|
|
|
|
internal static class User32 {
|
|
|
|
public delegate bool EnumMonitorsDelegate(IntPtr hMonitor, IntPtr hdcMonitor, ref NativeRect lprcMonitor, IntPtr dwData);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip, EnumMonitorsDelegate lpfnEnum, IntPtr dwData);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern bool GetMonitorInfo(IntPtr hMonitor, ref MonitorInfoEx lpmi);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern bool EnumDisplaySettings(string deviceName, int modeNum, ref DevMode devMode);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern bool EnumDisplayDevices(string lpDevice, uint iDevNum, ref DisplayDevice lpDisplayDevice, uint dwFlags);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern IntPtr GetDC(IntPtr hWnd);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDc);
|
|
|
|
[DllImport("user32.dll", SetLastError = true)]
|
|
public static extern int GetSystemMetrics(int smIndex);
|
|
|
|
}
|
|
}
|