Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple monitors in .NET

Tags:

c#

.net

multi-gpu

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?

like image 289
Nicros Avatar asked Mar 07 '11 01:03

Nicros


1 Answers

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

like image 123
Hans Passant Avatar answered Oct 05 '22 21:10

Hans Passant