我如何知道监视器在代码中连接到哪个DVI端口? [英] How do I know which DVI port a monitor is connected to in code?

查看:64
本文介绍了我如何知道监视器在代码中连接到哪个DVI端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个有三台显示器的WPF C#应用程序。至关重要的是,我所有方式加载视图以显示在正确的屏幕上,特别是因为我希望这些监视器将被热交换,并且其中两个监视器是相同的。我的问题是如何知道哪个屏幕连接到哪个DVI端口? Screen.Allscreens调用没有给我这个信息。我得到显示名称,但我不知道如何追溯到视频卡上的特定DVI端口。



帮助!

解决方案

据我所知,你没有。这些信息在您通常无法访问的任何地方都不存在。



视频驱动程序可能会公开此信息。您的问题是每个视频驱动程序都不同,并且如果有的话,不会以相同的方式公开信息。



我找不到检索这种类型的代码示例信息。

I am working on a WPF C# application that has three monitors. It is critical that I all ways load the view to show up on right screen especially because I expect these monitors will be hot-swapped, and two of these monitors are identical. My question is how to know which screen is connected to which DVI port? The Screen.Allscreens call does not give me this information. I get the display name, but I don't know how to trace that back to the specific DVI port on the video card.

Help!

解决方案

As far as I can find, you don't. The information doesn't exist anywhere you would normally have access to.

The video driver MIGHT expose this information. Your problem is that every video driver is different and doesn't expose information in the same way if at all.

I can find no code examples of retrieving this kind of information.


这篇关于我如何知道监视器在代码中连接到哪个DVI端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆