Has anyone found a working solution to be able to toggle the primary display from one to the other via a keyboard shortcut in Windows 7 (yes, I'm stuck with an Nvidia graphics card)? It appears the display driver model has changed in Windows 7 and all of the utilities (such as UltraMon) no longer function correctly to script this capability so I can assing a keyboard shortcut to program to my remote. Any C++ developers out there? From what I understand, pre-Windows 7 used the ChangeDisplaySettingsEx functions to perform these functions and Windows 7 has moved to the SetDisplayConfig function. Not knowledgable enough to write it myself or I would.
Any help is greatly appreciated.
KS
No idea here, but since we're talking Windows 7, you might want to try your luck asking on a Windows Powershell forum, too.
Do you need to change the primary display or will moving Media Center between the display be enough? There are some of the built in hotkeys that might help
Thanks for the quick responses. Ideally I just want to toggle the displays. This would be the same as selecting the "Show Desktop on X" option from the Multiple Monitor drop down in the Screen Resolution dialog. I've thought about trying to do something with Win+P and "sendkeys", but that doesn't lend itself well to "toggle" as you can't really tell the current state of the displays. The reason I say the "toggle" method is the ideal is that I run a number of additional apps within MCE (like TheaterTek for example) that could potentially open on a secondary display if it's still enabled.
Whatever help you can provide would be greatly appreciated. Only running two monitors the majority of the time (TV and DLP Projector). By assiging a toggle to a shortcut key I can add the command to my remote to switch between the two.
Thanks again
You got it. If you can make this work I think you'll have a rather large audience in the HTPC market and a potential to earn some $$$$... including from me :). I've spent the last couple of weeks trying various 3rd party trials, trying to figure out the code on my own, etc with 0 success. In my case, I don't really even need a UI. A simple counsel app that I can run on a shortcut key would work for me.
I REALLY appreciate the help. If you ever need any SQL Server help, look me up :)
Done: W7ToggleDisplay.exe
Let me know if useful to others and I will add command line arguments for doing additional items
I'm also making this an option under my app launcher plugin
I'll be posting updates (including native x64) to http://www.mikinho.com/
Thank you again mikinho. This does exactly what I needed and while it may seem rather simple, it's a HUGE deal for those of us with multi-display HTPCs. Thanks again.
Ok I downloaded this but I'm a little confused on how it works. My situation is I have an Nvida 8600 with an hdmi and vga output.My TV is hooked HDMI and my projector VGA. I need an app that will switch outputs either automatically depending on wich one is on or through a hotkey. I never use both displays at the same time so I'm not using extended desktop or clone mode. I currently have to open the Nvidia app and select which display i want to use. Thanks as alway Mikinho you are incredible resource here and I can't wait for your start menu custimization app.
I double clicked on it, selected run and a black box appeared for about 1 second then went away. Is there anything else to it?
Ok I did what you said and ran it from a command line. It said a couple things with numbers then it read "Success Primary Switched" but it did not do anything. I had the tv and the projector on while i was doing this. Please don't take any time off your other projects to work on this though, this is very low priority.