Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2007

Tip: Looking for answers? Try searching our database.

?? Setting Hotspot on Custom Cursor ??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
A. Foxmore - 14 Jun 2007 14:59 GMT
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!
Richard Lewis Haggard - 14 Jun 2007 16:29 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.