🍂Versatile Win32 console application that allows you to temporarily change a window’s associated mouse cursor, based on the window title.
-
May be used in the back-end in scenarios where a user may want to change the mouse cursor for :
📐Pixel Painting precision (I.e. during editing)
🎫 Allow different pointers for various applications during presentations.👨🏼🏫
🎮 Game development (I.e. shooting precision 💥🔫)
😎 Fancy pointers during screen recording.
🤪 Custom RainMeter skin Cursors.
Applications mainly implement custom cursors from binary resources like executable (.exe) files or DLLs, rather than creating the cursor at run time.
However CmdCursor lets you call a graphic directly from a .ANI or .CUR resource.
CmdCursor.dll /?
or CmdCursor.dll --?
or CmdCursor.dll -?
Running the above command on Command Prompt will print the help documentation to the stdout stream.
CmdCursor.dll /t "VLC media player" /c "%cd%/Mycursor.ani"
The above example toggles the cursor for VLC media player window ,to change from the default cursor to a cursor in the working directory
calledMycursor.ani
CmdCursor.dll exits after VLC is closed.
Properties in various UI controls ( i.e. edit controls, labels and buttons) may explicitly force the mouse cursor to change ,
therefore CmdCursor won’t have any effect on these type of controls, unless their properties allow their associated control cursor to be overridden.
To allow redrawing the new cursor on a target window (after calling CmdCursor.dll), the old cursor is not overridden until ;
either the mouse moves From and To the window, focus is regained, or a system command is executed so the system automatically redraws the
cursor design associated with the window to which the cursor is pointing.
Destroying the target window while CmdCursor is running will get you stuck to a custom cursor, to avoid this , emulate a separate instance using Start
command. For help , run Start /?
at the cmd console.
Cursors can not only be either monochrome or color but also static or animated. The type of cursor used on a particular computer system depends
on the system’s display. Therefore, old displays such as VGA do not support color or animated cursors. New displays, whose display drivers use the device-independent bitmap (BID) engine, do support them.
If the FQPN to the cursor ID not valid, or the window title is not found, then CmdCursor will terminate with an exit-code.
This exit codes will be parsed to DOS variable %errorlevel%
and can be verified using; Echo %errorlevel%
✔️✔️ (0) - Success / No Error.
❌❌ (1) - Non existant FQPN TO CURSOR handle parsed.
❌❌ (2) - Window title not found.
❌❌ (3) - Invalid Cursor extension prefix.
Currently supported are .ani and .cur