I have the following code in my project to change mouse cursor when the user is hovering over a custom button:
protected override void OnMouseEnter(EventArgs e)
{
this.Cursor = Cursors.Hand;
base.OnMouseEnter(e);
}
protected override void OnMouseLeave(EventArgs e)
{
this.Cursor = Cursors.Default;
base.OnMouseLeave(e);
}
This works fine, except that the cursor that is shown is the standard white hand cursor. But in Mouse Properties in Windows XP I have set the Link Select cursor to be an animated colorful arrow.
To investigate the problem I set the animated arrow as the Busy cursor in Mouse Properties and changed the code in OnMouseEnter
to:
this.Cursor = Cursors.WaitCursor;
This works as I expected and the arrow was shown.
It seems like Cursors.Hand
does not correspond to the Link Select cursor in Mouse Properties. But I can't find anything more appropriate to use in the Cursors
class. What am I doing wrong?