This is driving me nuts -- I create a cursor at runtime from an Image. The
problem is that the Hotspot is always the center of the resulting cursor.
There is a Hotspot property on the Cursor class but it's read only.
Is there anyway to set the Hotspot of a dynamically created cursor?
Thanks!
The basic problem is that you do not actually have a cursor. You have an
icon. The hotspot of an icon is always in the middle and you can't do
anything about that. The solution is a hack that I am particularly proud
of - make your icon big enough so that its middle hotspot resides where
you'd like to have the custom cursor's be.
For example, assume that you want to make a custom cursor from a standard
arrow. Define your actual custom icon to be big enough so that the arrow's
hot spot is in the middle of the icon. When the custom cursor draws, the
user will only see your arrow and the remaining 3/4's is all blank.

Signature
Richard Lewis Haggard
General: www.Haggard-And-Associates.com
Please come visit here for a couple thousand good giggles!:
www.haggard-and-associates.com/Humor/humor.htm
> This is driving me nuts -- I create a cursor at runtime from an Image. The
> problem is that the Hotspot is always the center of the resulting cursor.
[quoted text clipped - 3 lines]
>
> Thanks!
A. Foxmore - 14 Jun 2007 16:45 GMT
Well, I think I *do* have a cursor, not an icon. I am calling the Cursor's
c'tor. What's more, since when do icons have hotspots?
I appreciate the response but I was looking for less of a hack.
> The basic problem is that you do not actually have a cursor. You have an
> icon. The hotspot of an icon is always in the middle and you can't do
[quoted text clipped - 13 lines]
> >
> > Thanks!