0

I want to Enable the Mouse moves and clicks Using c# windows application. How to do this ?

I don't want to unplug my mouse from my PC. :)

Anuya
  • 8,082
  • 49
  • 137
  • 222
  • possible duplicate of [Using Window Handle to disable Mouse clicks and Keyboard Inputs using c#](http://stackoverflow.com/questions/2878989/using-window-handle-to-disable-mouse-clicks-and-keyboard-inputs-using-c) – SLaks May 24 '10 at 03:00
  • 1
    "possible" duplicate of the last 3 questions asked by this user – Jay May 24 '10 at 04:01

2 Answers2

0

You can use this library to make a mouse hook that can suppress the mouse input.
You can then check GetForegroundWindow() and set e.Handled to true.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • i used the function GetForegroundWindow(), i need to know how to disable the inputs of mouse now.. – Anuya May 24 '10 at 03:02
  • Make a mouse hook, but don't call `CallNextHookEx`. – SLaks May 24 '10 at 03:05
  • can u support me with any links to start with. – Anuya May 24 '10 at 03:06
  • Thanks for the link. I referenced the .dll to my application. But i find some difficulties in utilizing the .dll to disable mouse inputs. Because the source in Link is VB.Net which i dont understand. Can you help me calling the function form .dll ? – Anuya May 24 '10 at 03:28
0

Find the GUID of mouse and disable the mouse using c#

Anuya
  • 8,082
  • 49
  • 137
  • 222