Click here to Skip to main content
15,891,847 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to change the cursor when hovering over the desktop in vb.net. It needs to be a cursor that doesn't interfere with anything that could be open, for example if you were to hover over something in the browser, it could change the colour of the button (I'm making a colour picker). I've got all the code tracking the mouse cursor and returning the hex, r, g and b values of the pixel it is hovering over, I just need the cursor to be changed when NOT in the form and not interfere with anything.

Thanks, any help is appreciated.

What I have tried:

'I've only managed so far to change the cursor when in the form, but I want that to be opposite, so it will be the normal hand cursor in the form but the pen cursor when outside of the form, and when enter key pressed it will change back to hand (that part I can code though)
Posted
Comments
Richard MacCutchan 2-Oct-19 4:08am    
Without seeing your code it is impossible to guess what may or may not be the problem. Also, when the cursor moves outside of your form it will change to whatever cursor the system uses at that point.
Ralf Meier 2-Oct-19 8:58am    
I agree with the statement from Richard. You could only control the Cursor inside the Controls of your Application. There is no way to manipulate it outside your active Form (or Control).

But perhaps you can create a BaseForm with Opacity which is all the time under each of your Controls/Forms and "over" the Windows-Background. This Baseform could control the Cursor - but also not depending on what is under it ...
Member 14609618 2-Oct-19 11:55am    
alright, I've never heard of a baseform. How would I do that?
Member 14609618 2-Oct-19 16:19pm    
I will have a look, thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900