I may be way out in left field here but.... I've had trouble interfacing a few 3rd party apps with TD on Windows7 in the past, I found that taking the following steps got things working well.
Right click TD icon, go to properties
Click on the Compatibility Tab
Set "compatibility mode" to "Windows XP (service pack 2)"
Set "privilege level" to "run this program as an administrator"
Relaunch TD and try your mouse app again
Like I said, this may not help at all, but pretty easy to try out, certainly can't hurt
Good luck,
Beaker