views:

170

answers:

2

A friend of mine has to use an internally-written Windows application to perform part of their job.

Something he has noticed is that the app does the bit where it changes the mouse pointer to an hourglass when it's working, sets it back to normal when it's done, etc.

However there appears to be a bug where in some circumstances the mouse pointer does not return to normal and remains an hourglass. It still works fine, being able to click buttons and select things and so forth, but it's an hourglass and not an arrow like normal.

This behavior continues even after the application is exited.

Said friend was resorting to rebooting to fix the issue until we stumbled across the fact that bring up the "Mouse" dialog in the control panel appears to reset it to normal.

Being a developer, I figure there's got to be some sort of command or script or something to fix this. So, assuming that fixing the application is beyond the scope of my friend's power, how can one reset the mouse pointer via a script or other command?

+2  A: 

Sadly, you can't reset the mouse cursor from within pure VBScript or the like.

An article on a way to do it with a custom activeX control that wraps APIs can be seen here

Sk93
+1 Good find, my googling skills turned up lots of posts saying it couldn't be done!
MattH
A: 

As an alternative solution, would it be suitable for the user to change the icon used by the hourglass? This could be the same as their normal icon, or perhaps a slight variation. At least that way they'd always have a pointer with a point, but would save the alternative API calls which requires more time.

MattH