Global custom cursor that never change?
-
Hi, I have an app in my system tray. On a special key press, would it be possible to change system cursor to a custom one without having it changed regardless what other applications under the cursor might want to change it to? For instance, when holding down CTRL+ALT, my new cursor shows but it is quickly overriden by Internet Explorer because now I'm pointing on a url link (forcing the cursor to become a pointing hand). Disregard the fact that doing this - if at all technically possible - is not recommended for issues of interference and weird and unexpected behavior. Thx! /T
-
Hi, I have an app in my system tray. On a special key press, would it be possible to change system cursor to a custom one without having it changed regardless what other applications under the cursor might want to change it to? For instance, when holding down CTRL+ALT, my new cursor shows but it is quickly overriden by Internet Explorer because now I'm pointing on a url link (forcing the cursor to become a pointing hand). Disregard the fact that doing this - if at all technically possible - is not recommended for issues of interference and weird and unexpected behavior. Thx! /T
Tommy Svensson wrote:
would it be possible to change system cursor to a custom one
Well, I haven't tried it exactly; let me share some ideas or workarounds. You can change the system cursors to a custom one using either one of the following or in a combination of two. 1. SystemParametersInfo : Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter. 2. SetSystemCursor : Enables an application to customize the system cursors. It replaces the contents of the system cursor specified by the id parameter with the contents of the cursor specified by the hcur parameter and then destroys hcur. I will recommend the 1'st one to try out, beacuse by using this API you can do anything that you done to change the Desktop settings manually. Use the SPI_SETCURSORS parameter for changing cursor. You may get some ideas from 1. http://www.thebitguru.com/articles/14-Programmatically%20Changing%20Windows%20Mouse%20Cursors[^] 2.http://msdn.microsoft.com/en-us/library/ms724947.aspx[^] 3.How to programatically disable/enable screen savers/power management[^] *4. The google codesearch[^] result