Set 3 monitors to duplicate mode from code

I need to duplicate a screen across 3 monitors. It seems like windows does not natively allow this, one of them is always set to ‘extend’ mode. So, I have been doing it through the “nvidia control panel,” which works quite well.

However, I would like to be able to automate this with code. Is this something that NVAPI can achieve? I would like to be able to run the code from a C# program.

Dear @miles.drake

Thank you for contacting NVIDIA Developer Forum. In order to get and set the display configuration using NVAPI, you can use the following APIs:

* NvAPI_DISP_GetDisplayConfig
* NvAPI_DISP_SetDisplayConfig

To see a sample usage of these functions, kindly refer to the file Sample_Code\DisplayConfiguration\DisplayConfiguration.cpp inside the NVAPI SDK zip. You will have to correctly set the Path Info structure members to duplicate 3 monitors.

Thank you.
NVAPI Developer Forum