Community
cancel
Showing results for 
Search instead for 
Did you mean: 
benlbit
Beginner
135 Views

API to Switch between Cloned and Extended Desktop (e.g. ChangeDisplaySettingsEx)

Hi All

I'm trying to figure out howwith a multi-monitor system that uses the Intel Graphics Chipset to switch between Cloned Desktop and Extended Desktop using either MicrosoftWin32 APIs or any alternative offered by Intel drivers/SDK.

When a second monitor is connected it automatically installs in Cloned Desktopmode. I need a way to change this within my application. Reason being, it's used in aDigital Signage scenario - i.e. no keyboard/mouse input. Also, since around v7 of the Intel Graphics drivers, the Intel Graphics Control panel requires .NET Framework 3.5sp1 just to open (=bad =bad =bad) so for the moment I'm using v6 of the drivers.

When I enumerate the available display devices using the Win32 API EnumDisplayDevices, the DISPLAY_DEVICE.DeviceString(s) appear as follows:

\\\\.\\DISPLAY1\\Monitor0

\\\\.\\DISPLAY1\\Monitor1


When the Monitors are in Extended mode, they appear as follows:

\\\\.\\DISPLAY1\\Monitor0

\\\\.\\DISPLAY2\\Monitor0


I've read on various forums (MSDN etc)ChangeDisplaySettingsEx should be able to do this, butI can't get it to work. It's been suggested that perhaps the Intel drivers aren't suporting this.

Whenever I try parsing \\\\.\\DISPLAY1\\Monitor1 to ChangeDisplaySettingsEx I get DISP_CHANGE_BADPARAM - e.g.

ChangeDisplaySettingsEx(\\\\.\\DISPLAY1\\Monitor1, DevM, 0, CDS_GLOBAL Or CDS_UPDATEREGISTRY, 0)

Does anyone know how to disable Clone Mode and enable as Extended Mode using either Intel or Win32 APIs?

I'm developing in vb6 (legacy application) and it has to run on Windows XP.

Thanks

Ben

0 Kudos
0 Replies
Reply