C#通过设备管理器禁用鼠标键盘,亲测可用,用管理员权限运行,输入q,按回车,恢复鼠标。

上传者: maoli0758 | 上传时间: 2022-06-15 14:01:33 | 文件大小: 47KB | 文件类型: ZIP
通常禁用鼠标的方式有以下三种(1)通过Hook拦截鼠标键盘;(2)调用Win32Api InputBlock()函数;(3)通过设备管理器禁用鼠标键盘;本资源采用第三种方法,原理是通过设备的类Guid,获取到设备句柄,从而控制设备的使能。这样即使重启电脑设置也还是生效。如果鼠标不能动了,可以通过用新鼠标在任务管理器中重新启用设备(旧鼠标)恢复正常。或者本程序运行后,在输入框中输入q,回车解锁。通过学习本资源,举一反三,可以控制键盘,音响等其他设备。

文件下载

资源详情

[{"title":"( 21 个子文件 47KB ) C#通过设备管理器禁用鼠标键盘,亲测可用,用管理员权限运行,输入q,按回车,恢复鼠标。","children":[{"title":"禁用鼠标键盘","children":[{"title":"EnumUsbDeviceInfo","children":[{"title":"HardwareInfo.cs <span style='color:#111;'> 81B </span>","children":null,"spread":false},{"title":"MouseKeyboardHelper.cs <span style='color:#111;'> 15.22KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"EnumUsbDeviceInfo.exe <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false},{"title":"EnumUsbDeviceInfo.pdb <span style='color:#111;'> 29.50KB </span>","children":null,"spread":false},{"title":"EnumUsbDeviceInfo.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false}],"spread":true},{"title":"Release","children":null,"spread":false}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"EnumUsbDeviceInfo.exe <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false},{"title":".NETFramework,Version=v4.5.AssemblyAttributes.cs <span style='color:#111;'> 210B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.58KB </span>","children":null,"spread":false},{"title":"EnumUsbDeviceInfo.csproj.CoreCompileInputs.cache <span style='color:#111;'> 42B </span>","children":null,"spread":false},{"title":"EnumUsbDeviceInfo.pdb <span style='color:#111;'> 29.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"EnumUsbDeviceInfo.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 746B </span>","children":null,"spread":false},{"title":"Class1.cs <span style='color:#111;'> 15.19KB </span>","children":null,"spread":false},{"title":"EnumUsbDeviceInfo.csproj.user <span style='color:#111;'> 231B </span>","children":null,"spread":false},{"title":"App.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"BlockHelper.cs <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"EnumUsbDeviceInfo.csproj <span style='color:#111;'> 2.34KB </span>","children":null,"spread":false},{"title":"USBDeviceHelper.cs <span style='color:#111;'> 15.17KB </span>","children":null,"spread":false}],"spread":false},{"title":".vs","children":[{"title":"EnumUsbDeviceInfo","children":[{"title":"v16","children":[{"title":".suo <span style='color:#111;'> 68.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"EnumUsbDeviceInfo.sln <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明