开发者

Multiple monitors in .NET

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 h开发者_StackOverflowave 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?


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜