0

My work station has 3 displays. There are 2 windows in my application: the BIG Window and a LITTLE Window. BIG Window is running on the main screen. And the LITTLE Window should be shown on the another, specific screen, regardless the number of this screen.

I dont now what is the number of this screen (1,2,3..) and I don't know where is the screen located (on the left side, on the right side of the main screen).

What is the way I can do this? Is there some unique ID belongs to the screen?

Thank you, all

Matvey
  • 163
  • 2
  • 10
  • You can enumerate the monitors using the [`EnumDisplayMonitors`](https://msdn.microsoft.com/en-us/library/windows/desktop/dd162610(v=vs.85).aspx) in C++. I've not done the same using C#, though. – Anya Shenanigans Feb 03 '16 at 11:58
  • How can I know which monitor is the monitor I need ? – Matvey Feb 03 '16 at 12:24

1 Answers1

0

It can be done using the screen class. https://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx

Example code that identifies each screen:

// For each screen, add the screen properties to a list box.
foreach (var screen in System.Windows.Forms.Screen.AllScreens)
{
    listBox1.Items.Add("Device Name: " + screen.DeviceName);
    listBox1.Items.Add("Bounds: " + 
        screen.Bounds.ToString());
    listBox1.Items.Add("Type: " + 
        screen.GetType().ToString());
    listBox1.Items.Add("Working Area: " + 
        screen.WorkingArea.ToString());
    listBox1.Items.Add("Primary Screen: " + 
        screen.Primary.ToString());
}
David
  • 853
  • 8
  • 24