How can I programmaticly change windows display setting from Extend desktop to Clone desktop and the other way around ?
Asked
Active
Viewed 6,200 times
2 Answers
7
If you are using Windows7 you can use DisplaySwitch.exe
file with parameters /extend
and /clone

Navid Rahmani
- 7,848
- 9
- 39
- 57
-
Glad to know this executable exists! Saved me a lot of time. Also works in Window 8. Wonder if it will work in Vista. – Vippy Mar 11 '13 at 20:54
-
And Windows 11 22000.51! :) – Adrian S Jul 13 '21 at 05:15
3
This issue isn't going to be a simple "call this method in this .NET class" I don't believe. However, it can be done using the EnumDisplaySettingsEx()
API. Here is a SO question similar to yours that has the information you need to dig into this issue:

Community
- 1
- 1

IAmTimCorey
- 16,412
- 5
- 39
- 75
-
Hmmm, its long ago, but I cannot set any option for duplicating or mirroring the display with `EnumDisplaySettingsEx()` . Your Link just demonstrates how to set a screen as primary. – eDeviser Jun 20 '17 at 06:17