在 Windows 8 应用程序中调整屏幕亮度 [英] Adjust the screen brightness in a Windows 8 App
问题描述
我正在开发 Windows 8 应用程序.有没有办法访问设备的亮度设置,以便用户可以从应用程序内部调整设备的亮度?谢谢
I am developing a Windows 8 application. Is there a way I can access the device's brightness settings so the user can adjust the brightness of the device from inside the app? Thanks
推荐答案
我正在使用批处理文件来更改内容,但看起来 Windows 也提供了一个 API,您可以直接从 C#(以及 p/Invoke 然后调用)作为好吧...所以以上所有内容仍然正确并且仍然有效,但您也可以调用
I was using a batch file to change things but it also looks like Windows provided an API you can directly from C# (well p/Invoke and then call) as well... so all the above is still true and will still work, but you can also call
那些链接也很好,因为它们为您列出了所有子 guid.因此,只需 P/Invoke 那些坏孩子并直接从您的应用中调用它们,无需批处理文件 :)
Those links are nice too, because they have all the Sub guids listed out for you. So just P/Invoke those bad boys and call them directly from your app, no batch file needed :)
这篇关于在 Windows 8 应用程序中调整屏幕亮度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!