Solved

How to change mouse icon in VB6

Posted on 2006-06-27
14
8,701 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB 6 error 5 in windows 10 but not in XP 7 63
Zip Folders Using Chilkat Routines 1 59
Export Data to Different .csv Files 26 115
Send outlook email from VBS Script 2 45
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 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