如何使用.NET关闭特定的监视器?
OK,我知道有关于这个主题相当多的职位。然而,他们没有提供解决我的问题:我不想只是关闭我的显示器上,我希望我的代码以关闭特定显示器。大多数人指的是URL,的 http://fci-h.blogspot.com/2007/03/turn-off-your-monitor-via-code-c.html ,不帮助这里,因为它会关闭所有的显示器。
OK, I know there are quite a few posts on this topic. However, none of them provide the solution to my issue: I don't want just to turn off my monitor(s), I wish my code to turn off a specific monitor. The URL the most people refer to, http://fci-h.blogspot.com/2007/03/turn-off-your-monitor-via-code-c.html, doesn't help here, as it turns off all the displays.
所以,我有我的笔记本电脑的屏幕和一个额外的外部显示器。虽然我看电影,我切换显示到外接显示器和我的笔记本电脑屏幕变黑,但是,它仍然是上,并在黑暗中发光。我想将其关闭。谁能帮助吗?
So, I have my laptop screen and an additional external monitor. While I'm watching movies, I switch the display to the external monitor and my laptop screen goes black, however, it's still on and glowing in the dark. I wish to turn it off. Could anyone help please?
编辑:有什么办法来acomplish这一点,这意味着它不需要有在.net中写入。基本上,我只是需要一个.exe文件,该文件能够把特定的显示器关闭,并在交替进行。
Is there any way to acomplish this, meaning it needn't have to be written in .Net. Basically, I just need an .exe file that's able to turn the particular monitor off and on alternately.
它看起来像有关闭特定的显示器没有什么好办法,但它是可以设置你的笔记本电脑的背光调至最低亮度。根据你的Windows版本,也有不同的方法来做到这一点:
It looks like there's no good way of turning off a specific monitor, but it is possible to set your laptop's backlight to minimum brightness. Depending on which version of Windows you have, there are different ways to do it:
- 的发送IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS I / O控制如下所述:的 http://msdn.microsoft.com/en-us/magazine/dvdarchive/cc163415.aspx
- 使用WMI方法 WmiSetBrightness作为这里描述: HTTP ://stackoverflow.com/questions/373297/what-api-call-would-i-use-to-change-brightness-of-laptop-net/799207#799207
- 使用API赢 SetMonitorBrightness ,但我不认识任何人谁做它在C#中的。
- send IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS I/O control as described here: http://msdn.microsoft.com/en-us/magazine/dvdarchive/cc163415.aspx
- use WMI method WmiSetBrightness as described here: http://stackoverflow.com/questions/373297/what-api-call-would-i-use-to-change-brightness-of-laptop-net/799207#799207
- use Win API SetMonitorBrightness, but I don't know of anybody who has done it in C#.