简体   繁体   English

如何用.NET关闭特定的显示器?

[英]How to turn off particular monitor with .NET?

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. 大多数人提到的网址http://fci-h.blogspot.com/2007/03/turn-off-your-monitor-via-code-c.html在这里没有用,因为它关闭了所有的显示。

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? 有人可以帮忙吗?

EDIT: Is there any way to acomplish this, meaning it needn't have to be written in .Net. 编辑:有没有办法来实现这一点,这意味着它不必用.Net编写。 Basically, I just need an .exe file that's able to turn the particular monitor off and on alternately. 基本上,我只需要一个能够交替关闭和打开特定显示器的.exe文件。

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: 根据您拥有的Windows版本,有不同的方法:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM