Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a Radeon Graphics card with 2 Graphics port one for VGA and other for DVI port. 2 monitor is connected on these 2 ports. I want to create an application that will show 2 options. 1> Extended, and 2> Dual screen and perform the followings.

Case1: (Extended) 1st monitor will work as primary monitor and 2nd monitor will work as extended monitor

Case2: (Dual Screen) 1st and 2nd monitors will work as a dual screen (Same display on both monitor)

Please help me.
Posted

1 solution

Hi,

it's possible to do this with the Device Context Reference which P/Invokes to USER32.dll . Have a look into ChangeDisplayFunction and EnumDisplaySettings, described here:

http://msdn.microsoft.com/en-us/library/dd183411.aspx[

http://www.pinvoke.net/default.aspx/user32/ChangeDisplaySettings.html

http://www.pinvoke.net/default.aspx/user32/EnumDisplayDevices.html

if you are an owner of nvidia graphics card, have a look into
nvidia api, you will need to P/Invoke NVCPL.DLL:

http://developer.download.nvidia.com/SDK/9.5/Samples/DEMOS/common/src/NvCpl/docs/NVControlPanel_API.pdf[^]

Best Regards
 
Share this answer
 
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900