This is a small utility program I wrote to correct a problem that is experienced by some users of the Microsoft Intellimouse Explorer Optical Mouse, whose devices have defective microswitches under the buttons causing a single-click to be seen by Windows as a double-click (seemingly not "debounced" properly).
Contrary to Microsoft Knowledge Base Article 266738 — IntelliMouse: Mouse Double-Clicks When You Try to Single-Click — this problem is most likely to be caused by faulty hardware. However, I couldn't be bothered sending my mouse back, so I wrote a software solution to the problem.
For my mouse, the problem seems to be that the switch isn't "debounced" when you release the button — i.e. when you release it, it actually clicks again. Basically, the program intercepts "up" events for the left mouse button, and ignores any subsequent "up" events that follow within a very small time.