<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

        C# setting screen brightness Windows 7(C# 设置屏幕亮度 Windows 7)

        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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding and removing users from Active Directory groups in .NET(在 .NET 中的 Active Directory 组中添加和删除用户)
                  set equality in linq(在 linq 中设置相等)
                  HashSet conversion to List(HashSet 转换为 List)
                  How to set timeout for webBrowser navigate event(如何为 webBrowser 导航事件设置超时)
                  Test whether two IEnumerablelt;Tgt; have the same values with the same frequencies(测试两个IEnumerablelt;Tgt;具有相同频率的相同值)
                  How do you determine if two HashSets are equal (by value, not by reference)?(您如何确定两个 HashSet 是否相等(按值,而不是按引用)?)

                    <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>
                        <tbody id='1kZgq'></tbody>
                    • <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>