[DllImport("coredll.dll", SetLastError = true)] public static extern int ChangeDisplaySettingsEx( string lpszDeviceName, ref DEVMODE lpDevMode, IntPtr hwnd, ChangeDisplaySettingsFlags dwflags, IntPtr lParam );
Microsoft documentation: Link
Last updated 1 year ago