You cannot set the hook. I know from experience. Windows only allows left and right clicks from .NET. You will need to create a win32 dll and then call it in your .NET code to grab the hooks if you need to take this approach.
Or, as simple as this application sounds, just write it using the API anyway in C or C ++.
If this is just a small function in your application, and not the application itself, you will either have to find something to perform the injection and pass it into your .NET application, or you will need to find a way t connected with hooks.
source share