Tutorial :dual screen programming issue



Question:

I am using VSTS 2008 + C#. Is there any way to get the informaiton like, whether we are currently in dual monitor mode, how much is the current resolution of each desktop?

BTW: there are two modes of dual screen, duplicate screen or extended screen. I need a solution as well to distinguish between the different modes.

thanks in advance, George


Solution:1

System.Windows.Forms.Screen.AllScreens

Gets an array of all displays on the system.

The property Primary

Gets a value indicating whether a particular display is the primary device.

And the Bounds property may be the solution for the rest.

System.Windows.Forms.SystemInformation.VirtualScreen Property

Might be usefull for you, to determine if the primary monitor is cloned or extended.

VirtualScreen resolution higher than the ones of primary -> extended...

VirtualScreen resolution = the ones of primary -> cloned...


Solution:2

System.Windows.Forms.Screen  

provides you with screen data. Duplicate screen is not really considered another screen from an application point of view.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »