Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When we want to change the display setting, we can use the display setting UI.

But besides UI, can I directly change the setting in the registry so that I can programmatically do it?

For instance, I want to switch between "Duplicate these displays" and "Show desktop only on 1" via code.

How could I do so?

share|improve this question
It is possible to create a batch file that will read a key in the registry, and if its 1, make it 0, else it will make it 1. I don't know that there is a registry key for this though. – soandos Dec 14 '11 at 6:38
Not sure about registry, but this code project article shows how to change display settings programmatically. – Alexander Galkin Dec 14 '11 at 7:55

You must log in to answer this question.

Browse other questions tagged .