Multiple monitors in .NET

2019-03-27 13:33发布

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条回答
狗以群分
2楼-- · 2019-03-27 14:17

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.

查看更多
一纸荒年 Trace。
3楼-- · 2019-03-27 14:21

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

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-03-27 14:25

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.

查看更多
登录 后发表回答