.NET 中的多个监视器
无论硬件配置如何,所有显示都从 .NET 的 Screen.AllScreens
返回吗?例如,在一台 PC 上,您可以拥有:
- 显卡输出到两个显示器 = 总共 2 个显示器
- 每个显卡输出到 1 个显示器 = 总共 2 个显示器,
- 显卡每个输出到 2 个显示器 = 6 个显示器,
- Eyefinity 卡输出到 6 个显示器(在显示端口上)
在所有这些情况下,如果我使用 Screen.AllScreens ,我可以单独访问每个显示器吗?
另外,如果我有一张处于扩展模式的卡,即一张卡上插入了 2 个显示器,但它只是一个大桌面(我在工作中使用的桌面),该怎么办?我仍然可以指定在一个屏幕上显示的内容吗?
Are all displays returned from .NET's Screen.AllScreens
regardless of hardware configuration? For example, on a single PC you can have:
- Video card out to two display = total 2 displays
- Video cards each out to 1 display = total 2 displays,
- Video cards each out to 2 displays = 6 displays,
- 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,Windows 并不关心屏幕如何跨视频适配器分布。它只是为每个屏幕提供了自己的坐标,具体取决于您在“显示”小程序中如何排列它们。您可以通过设置窗口的位置和大小以适合 Screen.Bounds 来使窗口显示在特定窗口上
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
扩展桌面不影响屏幕数量。
假设每个显示器有 1 个屏幕应该是安全的。尽管某些硬件可能会报告错误的显示计数,但这种情况非常罕见。在这种情况下,您会在控制面板中注意到计数不正确。
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.
AllScreens
属性将列出 Windows 在控制面板中显示的相同监视器。例如,如果您将 Eyefinity 设置为单个大表面 (SLS),它将在列表中显示为单个条目;如果您将其设置为 6 个独立的监视器,则列表中将有 6 个条目。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.