4

How can I programmaticly change windows display setting from Extend desktop to Clone desktop and the other way around ?

jacob
  • 1,397
  • 1
  • 26
  • 53

2 Answers2

7

If you are using Windows7 you can use DisplaySwitch.exe file with parameters /extend and /clone

Navid Rahmani
  • 7,848
  • 9
  • 39
  • 57
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:

How do I enable a second monitor in C#?

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