Click here to Skip to main content
15,668,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am writing program for one of my project in which i want to disable wired mouse and wired keyboard to restrict its input events(like mouse movements , keypress events) , instead of that i will use bluetooth mouse and bluetooth keyboard. so help me to disable those.


What I have tried:

I used following code but it blocks all inputs, not only wired devices but also bluetooth HID devices. 

        private static extern bool BlockInput(bool block);

        public static void FreezeMouse()

        public static void ThawMouse()

1 solution

Hi !
I think you can give a look to this link :
Hardware Helper Library for C#[^]

It contains a way to enable disable your devices.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900