

I found a similar article in CodeProject, under NET EventArgs and raise the appropriate events. The second step was to extract the information received into a. WH_MOUSE with WH_MOUSE_LL in the MSDN example, and it works. WH_KEYBOARD_LL and WH_MOUSE_LL hooks that can be installed globally. Anyway, I continued my research and found out that there are exceptions. You cannot implement global hooks in Microsoft. At the end of this article, I found this explanation: This article describes how to tap the mouse movement, but it works only when an application is active. I was going to write such an application, so I searched MSDN and found "exactly" what I needed:ģ18804 - HOW TO: Set a Windows Hook in Visual C#. For example, MSN Messenger (or any other messenger). There are a number of applications that run in the background and detect user inactivity to change their mode. MouseEventArgs, so you can easily retrieve any information you need. This class allows you to tap keyboard and mouse and/or to detect their activity even when an application runs in the background or does not have any user interface at all. Thank you all for all your great comments on CodeProject forum and looking forward for your brilliant contributions at This will us also allow to keep this original article up to date.

So please be enthusiastic, feel free to join the project at Now instead of publishing yet another version on my own I decided to ask you all to actively participate. There where also many useful contributions which where usually posted as code snippets in forum. During all this time until now I receive a lot of positive feedback and recommendations.

This article was posted in 2004 and updated in 20.
