Multiple monitors in .NET

3.2k views Asked by At

Are all displays returned from .NET's Screen.AllScreens regardless of hardware configuration? For example, on a single PC you can have:

  1. Video card out to two display = total 2 displays
  2. Video cards each out to 1 display = total 2 displays,
  3. Video cards each out to 2 displays = 6 displays,
  4. Eyefinity card out to 6 displays (on displayports)

In all these cases, if I use Screen.AllScreens can I access each display individually?

Also, what if I have a card in extended mode, meaning 2 displays plugged into one card but it's just one big desktop (what I use at work)? Can I still specify content to appear on one screen?

3

There are 3 answers

0
Hans Passant On BEST ANSWER

Yes, Windows doesn't care how the screens are distributed across video adapters. It simply gives each screen its own coordinates, depending how you arrange them in the Display applet. You get your window to display on a specific one by setting its location and size to fit inside the Screen.Bounds

0
Fun Mun Pieng On

Extended desktop doesn't affect the number of screens.

It should be safe to assume 1 screen per display. Though some hardware may report wrong counts of display, this is very rare. In such cases, you will notice in the control panel that you have the incorrect count anyway.

0
Gabe On

The AllScreens property will list the same monitors that Windows shows in the control panel. For example, if you have an Eyefinity set up as a single large surface (SLS), it will appear as a single entry in the list; if you have it set up as 6 separete monitors, it will be 6 entries in the list.