简体   繁体   中英

How to programmatically disconnect chosen display

So, I have a 3 monitor setup on my windows machine, and whenever I'm performing graphically intense operations, such as rendering 3d models, playing video games, or rendering video footage, its taking a severe performance hit due to all the extra screens adding lots of overhead.

I can prevent this overhead by disconnecting/disabling my screens from control panel, or pulling the displayport cables out. Just turning the screens off doesn't help.

So I was wondering if .NET or atleast user32.dll or something had utilities for disconnecting a selected screen programmatically so it dissapears from the selectable monitors you can find in the Control Panel (settings in W10) ?

I tried looking for similar questions/answers and this is the closest I got: Turn on/off monitor

However trying that, it does disconnect both of my screens, but brings them back up after a few seconds

You can use the MultiMonitorTool by Nirsoft:

MultiMonitorTool is a small tool that allows you to do some actions related to working with multiple monitors. With MultiMonitorTool, you can disable/enable monitors, set the primary monitor, save and load the configuration of all monitors, and move windows from one monitor to another. You can do these actions from the user interface or from command-line, without displaying user interface. MultiMonitorTool also provides a preview window, which allows you to watch a preview of every monitor on your system.

Examples to disable a monitor or multiple monitors:

MultiMonitorTool.exe /disable 1
MultiMonitorTool.exe /disable \\.\DISPLAY3
MultiMonitorTool.exe /disable 1 2 3

Examples to enable a monitor:

MultiMonitorTool.exe /enable 3
MultiMonitorTool.exe /enable \\.\DISPLAY1
MultiMonitorTool.exe /enable 3 2

Source MultiMonitorTool .

See the source link above for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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