public static void SetVideoPowerState(VideoPowerState value) { IntPtr hdc = GetDC(IntPtr.Zero); VideoPowerManagement vpm = new VideoPowerManagement { Length = 12, DPMSVersion = 1, PowerState = value }; ExtEscape(hdc, SETPOWERMANAGEMENT, vpm.Length, ref vpm, 0, IntPtr.Zero); }