如何使用C#了解连接到PC的keyborad或鼠标 [英] how to know the keyborad or mouse connected to the PC using C#

查看:129
本文介绍了如何使用C#了解连接到PC的keyborad或鼠标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道键盘或鼠标是否连接到PC。首先,我尝试使用WMI来检索这些信息。但我发现无论键盘或鼠标是否连接到PC,我编写的程序都显示这些设备都可以,并且设备管理器中这些设备的状态也可以。那么,我如何使用C#获取这些设备的状态?谢谢!

解决方案

请查看键盘,鼠标状态 [ ^ ]

I want to know whether the keyboard or mouse connected to the PC. Firstly, I try to using WMI to retrive these information. But I found that whether the keyboard or mouse connected to PC, the program I wrote shows these devices are OK,and the status of these devices in Device Manager are ok also. So, how i can get the status of these devices using C#? Thanks!

解决方案

Please check Keyboard, Mouse Status[^]


这篇关于如何使用C#了解连接到PC的keyborad或鼠标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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