7

Short version

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


Long version

So I have a NVIDIA GeForce GTX 560 Ti which can run two displays simultaneously. It has two DVI connections and one HDMI. I often swap from using my two desktop monitors and connect only one of the desktop monitors plus my TV using HDMI.

I would like to automate the change back and forward using a batch script or other program instead of using the windows control panel (Control Panel\All Control Panel Items\Display\Screen Resolution) or the NVIDIA Control Panel.

I found some documentation on using "rundll32.exe, NvCpl.dll, dtcfg ...." etc. This did not work at all. Nothing happens for any parameters I use from the NVIDIA PDF documentation. Does anyone have an example that works? I have tried this on Windows 7 as well.

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

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

How can I get this working?

I would like to get this working in C#, so I can use it with changing audio device as well :)

Ryan Gates
  • 4,501
  • 6
  • 50
  • 90
Bjarte
  • 2,167
  • 5
  • 27
  • 37
  • Did you get this working? I am facing a similar problem. rundll32.exe command did not work for me either. I tried the same on WinXP and it works. Did you try the sample application for control panel API in WinXP compatibility mode? – Sai Oct 05 '12 at 00:46
  • No, I still have not found a way to do this. – Bjarte Oct 05 '12 at 07:01
  • Did you try [this](http://developer.nvidia.com/nvapi)? – Sai Oct 05 '12 at 08:50
  • Have no tried this one, lacked C# examples on google results and was wondering if anyone have examples of this in C++ or other languages to do a screen change, like I described in the question :) – Bjarte Oct 12 '12 at 11:10
  • This [example](http://blogs.msdn.com/b/matthew_van_eerde/) explains ChangeDisplaySettingsEx function in the Win32 API. This [example](http://www.codeproject.com/Articles/178027/How-to-create-a-display-switcher-for-Windows-XP) shows how to obtain inactive displays. You should probably look at them – Sai Oct 12 '12 at 12:46

1 Answers1

1

Although this is may not meet your requirements, I did run in to this problem when using my laptop to power several monitors, and I ended up using the Display Profiles feature in UltraMon. I never scripted it or used their SDK, but I do know that they do support automation and SDK access.

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

Mitch
  • 21,223
  • 6
  • 63
  • 86