Automatically change connected displays in Windows 8

Short version

How to automate changing multiple display options? NVIDIA, 3x monitors (2x DVI and 1x HDMI), GPU only supports 2 active monitors.


Long version

So, I have an NVIDIA GeForce GTX 560 Ti that can run two displays at the same time. It has two DVI connections and one HDMI . I often switch from two monitors on the desktop and connect only one monitor for the desktop plus my TV using HDMI .

I would like to automate the change back and forth using a batch script or another program instead of using the Windows Control Panel (Control Panel \ All Control Panel Items \ Display \ Screen Resolution) or the NVIDIA Control Panel.

I found documentation on using " rundll32.exe , NvCpl.dll , dtcfg ....", etc. That didn't work at all. Nothing happens due to any parameters that I use in the NVIDIA PDF documentation. Does anyone have an example that works? I also tried this on Windows 7.

I tried using WMI to see if there is a monitor, but it only shows two active monitors. It does not show a third inactive monitor.

I tried EnumDisplayDevices from User32.dll , but this only returns two active monitors.

How can I make this work?

I want this work to work in C #, so I can use it to change the audio device as well :)

+7
source share
1 answer

Although this may not meet your requirements, I ran into this problem when using my laptop to power multiple monitors, and I ended up using the Display Profiles feature in UltraMon . I have never written a script or used their SDK , but I do that they support automation and access to the SDK.

Note. I am in no way affiliated with UltraMon, I just used their product and found it according to my needs.

+1
source

All Articles