Link to home
Start Free TrialLog in
Avatar of TJ_Eng
TJ_Eng

asked on

How to change mouse icon in VB6

Hi,

How do I change the mouse icon to a 'HAND' when it moves over a HyperLink?
Avatar of List244
List244

Visual Basic does not have a hand icon.  You will need to set the object which contains the hyperlink's
MousePointer property to 99 and then set the MouseIcon property to point to the icon which is a hand.
Avatar of TJ_Eng

ASKER

ok, what value is the hand?
There is no value for the hand, you need to find a hand icon and point your object to use that icon file.
Theoretically you could declare the setcursor apis:
Private Const IDC_HAND As Long = 32649
Private Declare Function LoadCursor Lib "user32.dll" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Private Declare Function SetCursor Lib "user32.dll" (ByVal hCursor As Long) As Long
And then use SetCursor LoadCursor(0, IDC_HAND)

But VB changes cursors back so much that you'd have to basically put it in every event involving a mouse.  Definitely easier to just use a hand mouse icon.
the hand icon is somewhere in the c:\program files\visual studio 6.0\  folder.
ASKER CERTIFIED SOLUTION
Avatar of List244
List244

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
so many solutions were given for this questions. Dnt know why none of them were accepted??
I guess the solutions provided are right..but there is no response....
Hello Sir,

  Kindly let us know the status.

with regards,
padmaja.