Solved

How to change mouse icon in VB6

Posted on 2006-06-27
14
8,659 Views
Last Modified: 2013-12-25
Hi,

How do I change the mouse icon to a 'HAND' when it moves over a HyperLink?
0
Comment
Question by:TJ_Eng
  • 3
  • 3
  • 2
  • +3
14 Comments
 
LVL 8

Expert Comment

by:List244
Comment Utility
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.
0
 

Author Comment

by:TJ_Eng
Comment Utility
ok, what value is the hand?
0
 
LVL 8

Expert Comment

by:List244
Comment Utility
There is no value for the hand, you need to find a hand icon and point your object to use that icon file.
0
 
LVL 2

Expert Comment

by:davidnsc1
Comment Utility
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.
0
 
LVL 15

Expert Comment

by:JackOfPH
Comment Utility
the hand icon is somewhere in the c:\program files\visual studio 6.0\  folder.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 8

Accepted Solution

by:
List244 earned 43 total points
Comment Utility
More accurately...:

*Common\Graphics\Cursors

Where * is the install location such as: C:\Program files\Microsoft Visual Studio\

And the hand icon you most likely want would be:
H_POINT.CUR
0
 
LVL 8

Assisted Solution

by:kaliyugkaarjun
kaliyugkaarjun earned 41 total points
Comment Utility
0
 
LVL 6

Assisted Solution

by:saravananvg
saravananvg earned 41 total points
Comment Utility
Hello Sir,

  To change the cursor of a control:

Me.Cursor = Cursors.WaitCursor


To change the cursor for the application:

Cursor.Current = Cursors.WaitCursor

Cursor.Current is a shared member of the cursor class, not a property of the
Form's cursor.

The latter will keep the cursor only until Application.Doevents ist called
(see docs).


and also check the following example

http://vbnet.mvps.org/index.html?code/intrinsic/sehyperlink.htm

with regards,
padmaja.
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
Comment Utility
so many solutions were given for this questions. Dnt know why none of them were accepted??
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
Comment Utility
I guess the solutions provided are right..but there is no response....
0
 
LVL 6

Expert Comment

by:saravananvg
Comment Utility
Hello Sir,

  Kindly let us know the status.

with regards,
padmaja.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now