Check out
Screen Class[
^]
If you run this code:
foreach (Screen screen in Screen.AllScreens)
{
Console.WriteLine("Device Name: " + screen.DeviceName);
Console.WriteLine("Bounds: " +
screen.Bounds.ToString());
Console.WriteLine("Type: " +
screen.GetType().ToString());
Console.WriteLine("Working Area: " +
screen.WorkingArea.ToString());
Console.WriteLine("Primary Screen: " +
screen.Primary.ToString());
}
Then for my computer it returns:
Device Name: \\.\DISPLAY1
Bounds: {X=0,Y=0,Width=1920,Height=1080}
Type: System.Windows.Forms.Screen
Working Area: {X=0,Y=0,Width=1920,Height=1050}
Primary Screen: True
Device Name: \\.\DISPLAY2
Bounds: {X=1920,Y=0,Width=1920,Height=1080}
Type: System.Windows.Forms.Screen
Working Area: {X=1920,Y=0,Width=1920,Height=1080}
Primary Screen: False
If you look at
Working Area, you can see the X and Y is different.
And there you can see it monitor is above, below, to the right, or left of the primary monitor.
My primary monitor is \\.\DISPLAY1 and to my right I have the secondary monitor.