Solved

How to change mouse icon in VB6

Posted on 2006-06-27
14
8,726 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +3
14 Comments
 
LVL 8

Expert Comment

by:List244
ID: 16992507
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
ID: 16992626
ok, what value is the hand?
0
 
LVL 8

Expert Comment

by:List244
ID: 16992766
There is no value for the hand, you need to find a hand icon and point your object to use that icon file.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 2

Expert Comment

by:davidnsc1
ID: 16996317
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
ID: 17006420
the hand icon is somewhere in the c:\program files\visual studio 6.0\  folder.
0
 
LVL 8

Accepted Solution

by:
List244 earned 43 total points
ID: 17006443
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
ID: 17007071
0
 
LVL 6

Assisted Solution

by:saravananvg
saravananvg earned 41 total points
ID: 17008498
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
ID: 17293875
so many solutions were given for this questions. Dnt know why none of them were accepted??
0
 
LVL 8

Expert Comment

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

Expert Comment

by:saravananvg
ID: 17340868
Hello Sir,

  Kindly let us know the status.

with regards,
padmaja.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add a task in Outlook from access 11 43
MsgBox 4 76
Advice in Xamarin 21 121
Create Files based on Cell Values in a Range in Excel 12 44
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

752 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