views:

207

answers:

1

I have a form with a Transparency-key color, where I'm doing a global mouse hook for the right click.

Until there everything is okay, but since the form is transparent, the mouse cursor is changing according to what is behind the form.

Is there any way to change the global mouse cursor?

+1  A: 

Yup, that's how transparency works. Not just to the eye of the user, also to what the mouse sees from its left eye. Has to work that way, major user confusion if it didn't, no option to change it.

The workaround is to show a fake version of the desktop. A screen shot. Just what the ever popular Windows Snipping Tool does. Sample code is in this thread.

Hans Passant
Yea, I know that workaround, it has my first approach to the problem and it work's.But the performance isn't the best, because in my case the form is moving with the mouse and on a second form I've an element acting like a magnify glass.So I tried with global mouse move/click hooks and I'm getting a lot better performance.And btw it seems that the problem only occurs on the winxp, on windows 7 the mouse cursor doesn't change.
Ervilha
Yes, Aero affect this behavior, I think. Not sure how to move this thread forward from here. Still don't know what you're *really* trying to do.
Hans Passant
I've a form with an element that acts like a magnify glass, and the other form, the transparent one, a little 100x100 transparent square with only 1 pixel borders that is positioning on the centre of the mouse cursor (cross cursor looking like a target), is representing the area of that magnify glass, so the reason I'm doing that is to pick any color with a mouse click without sending the click to the desktop.But yea it seems there is no solution for the way I'm trying to go, will wait a bit more to see if some one have any suggestion than will accept your answer.
Ervilha