.net – Hook application with .NET to capture double click events


How can I hook an application so that I can find out when the mouse is double clicked within it?

Can this be done in .NET?

Are there anythings I should be careful about? (crashing the other application, for instance)

Best Solution

The article "How to inject a managed .NET assembly into a managed process" will give you all you need to know to set the hook.

The article "How I Built a Working Poker Bot: Part 4" will give you all you need for capturing the double clicks.

The code for both articles can be fairly domain specific, but you shouldn't have much trouble pulling out the golden nuggets to get up and running.