Most solutions that addresses the MousePointer property's lack of support for some of the standard cursors (most notably the "hand" cursor) tend to be based on either converting the standard cursor to a MouseIcon/DragIcon or setting the cursor using the SetCursor API function during the MouseMove event. While both approaches produce generally acceptable results most of the time, they still have obvious shortcomings that makes them appear like cheap workarounds. Converting a standard cursor to a MouseIcon/DragIcon, for instance, doesn't support animated cursors. Setting the cursor during the MouseMove event, on the other hand, exhibits an annoying flickering as the cursor rapidly alternates between the class cursor and the specified cursor. The proper way of dealing with this, according to MSDN, is through subclassing:
The small and simple class module (and supporting standard module) in the attachment below contains all of the logic needed to set the desired standard cursor for all of the specified windowed and/or windowless controls. A demo project is also included that illustrates its use.
![Name: clsCursor Demo.png
Views: 96
Size: 5.8 KB]()
Subclassing, of course, has its disadvantages as well, especially when debugging in the IDE. However, for those seeking more professional looking results, there's no better way of overriding the class cursor than via subclassing.
Quote:
Originally Posted by MSDN
Subclassing, of course, has its disadvantages as well, especially when debugging in the IDE. However, for those seeking more professional looking results, there's no better way of overriding the class cursor than via subclassing.