Github: https://github.com/CHNMaxGor/AjustScreenBrightness
方法一: 使用网上常说的 Gdi32.dll 下的 SetDeviceGammaRamp (修改系统Gamma)
DllImport("gdi32.dll")] public static extern bool GetDeviceGammaRamp(IntPtr hDC, ref RAMP lpRamp);
[DllImport("gdi32.dll")] public static extern bool SetDeviceGammaRamp(IntPtr hDC, ref RAMP lpRamp);
方法二: 使用MSDN上的 dxva2.dll SetMonitorBrightness
1 [DllImport("dxva2.dll")] 2 public static extern bool GetNumberOfPhysicalMonitorsFromHMONITOR(Int