Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set desktop to extend/clone in dual display in windows

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

like image 466
jacob Avatar asked Dec 27 '22 19:12

jacob


2 Answers

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

like image 127
Navid Rahmani Avatar answered Jan 04 '23 23:01

Navid Rahmani


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#?

like image 40
IAmTimCorey Avatar answered Jan 04 '23 22:01

IAmTimCorey