Reputation: 25928
I am attempting to change the display settings to "Duplicate" when I have 2 monitors connected to a PC?
Ie, I am attempting to select the following setting(outlined in red) but using a WinAPI function call.
My Problem: I dont know what WinAPI function call I use to change the display setting to "Duplicate"? I've googled and haven't found any such function.
I am looking for a function that is supported on Windows 2000 or XP and up and not just a Windows Vista and up function. Does anyone know what WinAPI function call I use to achieve this?
Upvotes: 2
Views: 649
Reputation: 490128
I believe you want to use ChangeDisplaySettingsEx
. You set up DEVMODE
structures for both monitors, with the dmPosition
member set to (0, 0)
, and set (only) the DM_POSITION
flag, so all you do is change their relative positions, not things like resolution or bit depth.
This is supposed to work back as far as Windows 2000.
Upvotes: 2
Reputation: 430
i THINK U WILL GET THE ANSWER OF YOU QUESTION LINK BELOW
http://www.c-sharpcorner.com/uploadfile/GemingLeader/changing-display-settings-programmatically/
Upvotes: 1