http://www.askdavetaylor.com/weird_leaping_mouse_problems.htmlFirst off, my general rules for dealing with mouse problems:
* Your mouse drive may need updating or replacement if it got corrupted.
* Your mouse to computer connections may be loose.
* Or, your mouse itself may be dirty, so you need to clean it as per your manufacturer's instructions.
Now, let's get into some specifics.
The first thing I would look for with optical mice is any sort of obstruction under the optical sensor. Sometimes dust, lint, or similar impediments get stuck between the optical sensor and the surface your mouse sits on, causing unexpected behavior. My second guess would be a surface that isn't favorable for optical mice. Optical mice have problems on porous surfaces and surfaces like glass. Typically this causes more frequent and obvious problems though. To eliminate the surface you are using as the problem, try putting something like a blank piece of paper under the mouse and see if the problems continue.
If obstructions and the surface are eliminated as problems, Microsoft has a knowledge base article on erratic mouse pointer movement that may help. As you can see in this article, there is more to it than uninstalling and reinstalling the mouse driver. Microsoft Support on Mouse Problems
I have also seen reports of the new Gateway tablets doing this. These models vent hot air through the keyboard. If the lid is left closed when the tablet is docked, the touchpad heats up and causes the mouse to jump around. The only resolution have seen on this is just to leave screen up, though I'd be tempted to leave the unit on ice and see what happened!
As I've said, it's possible that something has corrupted your mouse driver. You can either 1) re-install the driver, or 2) roll back the driver. Either one of these may help. To roll back your driver in Windows XP, go to Start → Settings → Control Panel → Mouse. Click on the "hardware" tab. Select the appropriate pointing device, and click "properties." Click the driver tab, then select "roll back driver."
Under the "hardware" tab, there may be more than one mouse. If this is the case, select the one that is not used, follow the settings above, and then select "uninstall." Or, you can go into Control Panel → System → Hardware → Device Manager, and remove the device under "Mice and other pointing devices." Note: if you are on a laptop with a touchpad that you never use, don't remove the touchpad anyway.
Another possibility is that the driver has a corrupted "jump to" setting. This is called different things by different manufacturers, but is a setting where it moves to the default button when a window pops up. It could be moving to the corner instead of moving to the button. This is also suggested because you note that it is often "when you are about to click." Find this setting under mouse properties (as above) and disable it.General rules of mouse problems:
Hope that all helps you debug your problems!