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 :)
Bjarte
source share