Search code examples
windowsvb6mouse-cursor

Use a Custom MouseIcon in VB6


I'm creating an application in VB6, and I want to use my own cursors. I set the correct properties for the form:

MousePointer: 99 - Custom
MouseIcon: "My Icon"

Where "My Icon" is the file for the cursor. After all of the properties are set, my custom cursor appears, but when I click, it's not pointed at the tip of the cursor, it's at the bottom-right corner of the cursor. When I use one of the cursors that came with Windows, this is not a problem.


Solution

  • Cursors have a "hotspot" which is set in the .cur file: this defines where the click occurs.

    You need to set the hotspot in whatever .cur editor you are using.