检测面板/显示器是否通过HDMI电缆连接。 [英] Detect Panel/Monitor is connected through HDMI cable or not.

查看:128
本文介绍了检测面板/显示器是否通过HDMI电缆连接。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI

我正在开发一个UWP应用,我需要检查我的面板或显示器是否通过HDMI线连接。发送批次或时间之后我找到了以下解决方案 -

I am developing an UWP app where I need to check my Panel or Monitor is connected through HDMI cable or not. After sending lot or time I found solution below-

通过使用它,我可以通过HDMI线连接显示器。

By using same, I am able to get monitor connectivity through HDMI cable. This returns me True when

显示器/面板通过HDMI和显示器/面板显示器 - ON或OFF连接时,返回True。 

Monitor/Panel is connected through HDMI and Monitor/Panel Display - ON or OFF. 




但是当我在触摸屏上检查它时,只有当我在 

But when I check it on a touch panel Its only return me true when 

显示器/面板通过HDMI和显示器/面板显示器连接 - 开启 

Monitor/Panel is connected through HDMI and Monitor/Panel Display - ON 

并在

显示器/面板通过HDMI和显示器/面板显示器连接 - 关闭  (这是我的问题)

Monitor/Panel is connected through HDMI and Monitor/Panel Display - OFF  (This is my problem)

我需要任何其他解决方案,当HDMI连接任何面板开启/关闭时找到真。

I need any other solution for finding true when HDMI connected either Panel is ON/OFF.

sandeep chauhan

sandeep chauhan

推荐答案

嗯,根据这里的文件:  枚举设备,提到来自
的API Windows.Devices.Enumeration 命名空间可以获得物理连接的总线。 例如,您可以在设备管理器中看到的任何内容。
这意味着如果您的设备未显示在设备管理器中,则无法通过DeviceInformation.FindAllAsync方法找到它。不幸的是,在我的测试中,如果通过HDMI端口连接了断电监视器,它将不会显示在设备管理器中。
所以这是一个例外行为,如果关闭显示器它会返回false。

Well, according to the document here: Enumerate devices, it is mentioned that APIs from Windows.Devices.Enumeration namespace could get buhysically connected buses. For example, anything that you can see in the Device Manager. That means if you device doesn't show up in the Device Manager, it won't be find by DeviceInformation.FindAllAsync method. And unfortunately in my test, if a power-off monitor is connected via HDMI port, it won't show up in the Device Manager. So this is a excepted behavior that it returns false if the display is turned off.

这似乎不可能通过UWP API获得这样的断电监视器。您可以查看其他API,看看是否可以实现。

This seems not possible to get such a power-off monitor via UWP APIs. You might take a look at other APIs to see if this could be implement.




致以最诚挚的问候,

Roy


这篇关于检测面板/显示器是否通过HDMI电缆连接。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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