<bdo id='IHZoZ'></bdo><ul id='IHZoZ'></ul>

<small id='IHZoZ'></small><noframes id='IHZoZ'>

      <i id='IHZoZ'><tr id='IHZoZ'><dt id='IHZoZ'><q id='IHZoZ'><span id='IHZoZ'><b id='IHZoZ'><form id='IHZoZ'><ins id='IHZoZ'></ins><ul id='IHZoZ'></ul><sub id='IHZoZ'></sub></form><legend id='IHZoZ'></legend><bdo id='IHZoZ'><pre id='IHZoZ'><center id='IHZoZ'></center></pre></bdo></b><th id='IHZoZ'></th></span></q></dt></tr></i><div id='IHZoZ'><tfoot id='IHZoZ'></tfoot><dl id='IHZoZ'><fieldset id='IHZoZ'></fieldset></dl></div>
      <legend id='IHZoZ'><style id='IHZoZ'><dir id='IHZoZ'><q id='IHZoZ'></q></dir></style></legend>

    1. <tfoot id='IHZoZ'></tfoot>

        C# 设置屏幕亮度 Windows 7

        时间:2023-10-24

        1. <small id='it68W'></small><noframes id='it68W'>

            <bdo id='it68W'></bdo><ul id='it68W'></ul>
              <i id='it68W'><tr id='it68W'><dt id='it68W'><q id='it68W'><span id='it68W'><b id='it68W'><form id='it68W'><ins id='it68W'></ins><ul id='it68W'></ul><sub id='it68W'></sub></form><legend id='it68W'></legend><bdo id='it68W'><pre id='it68W'><center id='it68W'></center></pre></bdo></b><th id='it68W'></th></span></q></dt></tr></i><div id='it68W'><tfoot id='it68W'></tfoot><dl id='it68W'><fieldset id='it68W'></fieldset></dl></div>

              1. <legend id='it68W'><style id='it68W'><dir id='it68W'><q id='it68W'></q></dir></style></legend>

                    <tbody id='it68W'></tbody>
                  <tfoot id='it68W'></tfoot>

                  本文介绍了C# 设置屏幕亮度 Windows 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想自己调整屏幕亮度.因为 Windows 让我只能在有限的范围内进行调整.我想将显示器从 0 调暗到 100% 并将其关闭/打开.如果Windows可以自动执行它应该是可能的(在:x分钟后显示暗淡/在:x分钟后关闭显示).我尝试了一些我通过谷歌找到的资源和类.但它们都不起作用.

                  I want ajust screen brightness by my self. Because Windows lets me only adjusting in limited range. I want dim the display from 0 to 100% and turning it off/on. It should be possible if windows can it do automatically (Dim display after: x minutes/Turn off display after: x minutes). I tried some sources and classes what I found by google. But no of them works.

                  你有没有试过这个,或者你能推荐我任何工作代码吗?

                  Have you ever tried this or can you recommend me any working code?

                  感谢您的回复.

                  推荐答案

                  您可以使用 WmiSetBrightness 方法:

                  using System.Management;
                  //...
                  static void SetBrightness(byte targetBrightness) {
                      ManagementScope scope = new ManagementScope("root\WMI");
                      SelectQuery query = new SelectQuery("WmiMonitorBrightnessMethods");
                      using(ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query)) {
                          using(ManagementObjectCollection objectCollection = searcher.Get()) {
                              foreach(ManagementObject mObj in objectCollection) {
                                  mObj.InvokeMethod("WmiSetBrightness",
                                      new Object[] { UInt32.MaxValue, targetBrightness });
                                  break;
                              }
                          }
                      }
                  }
                  

                  有关详细信息,请查看 WDDM 中的亮度控制 和 监控配置功能

                  For more details, please take a look at Brightness Control in WDDM and Monitor Configuration Functions

                  这篇关于C# 设置屏幕亮度 Windows 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:“由于系统缺乏足够的缓冲区空间或队列已满,无法对套接字执行操作" 下一篇:如何创建一个有边框但没有标题栏的表单?(如 Windows 7 上的音量控制)

                  相关文章

                  <small id='1kZgq'></small><noframes id='1kZgq'>

                • <tfoot id='1kZgq'></tfoot>
                • <legend id='1kZgq'><style id='1kZgq'><dir id='1kZgq'><q id='1kZgq'></q></dir></style></legend>
                • <i id='1kZgq'><tr id='1kZgq'><dt id='1kZgq'><q id='1kZgq'><span id='1kZgq'><b id='1kZgq'><form id='1kZgq'><ins id='1kZgq'></ins><ul id='1kZgq'></ul><sub id='1kZgq'></sub></form><legend id='1kZgq'></legend><bdo id='1kZgq'><pre id='1kZgq'><center id='1kZgq'></center></pre></bdo></b><th id='1kZgq'></th></span></q></dt></tr></i><div id='1kZgq'><tfoot id='1kZgq'></tfoot><dl id='1kZgq'><fieldset id='1kZgq'></fieldset></dl></div>

                      <bdo id='1kZgq'></bdo><ul id='1kZgq'></ul>