Solved

How to change mouse icon in VB6

Posted on 2006-06-27
14
8,675 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
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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

863 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

23 Experts available now in Live!

Get 1:1 Help Now