0

I want to disable a pc mouse from a C# code. I don't want to just disable moving or clicking. I want to disconnect the mouse from power. With monitor there is a solution via SendMessage win32 method. I haven't found suchlike solution for a mouse. Is there any solution for this?

Ladislav Ondris
  • 1,246
  • 10
  • 19
  • You need to disable installed mouse device driver to achieve this. May be [this solution](http://stackoverflow.com/a/1610140/6170142) is what you are looking for. – Kamalesh Wankhede Oct 13 '16 at 08:48
  • I don't think you'll find anything specifically for a mouse, but if you can identify the USB port on which the mouse is connected then you can disable power to that port. There are plenty of sources available for how to disable power to USB, so I won't write anything about that here. – LordWilmore Oct 13 '16 at 08:49
  • Wouldn't it just be easier to unplug the mouse? – David Heffernan Oct 13 '16 at 10:07
  • There is no way to disconnect the monitor from power by way of an API call. You are making this up. And there is no way to do this for a mouse either. – IInspectable Oct 13 '16 at 10:43

0 Answers0