There are many articles of this type, but I didn't find any article discussing about how to hook the mouse and the keyboard using Visual Basic .NET. Since I have done this in VB.NET, I decided to post it here for people who will need it.
This project is a single component that contains various Windows hooks (I might add some other hook types in this component in future, if I have time).
- Clipboard hook
- Keyboard hook
- Mouse hook
It is a library file WindowsHookLib.dll that can be referenced from various projects.
This component differs from what I have seen in other similar articles, by providing two more things:
- Preventing a message to be passed to other windows.
- Raising the
MouseClick
andMouseDoubleClick
events. (I have never seen them in other low level hooks!)
Read more: CodeProject