Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Change mouse cursor when over web link

Posted on 2003-03-20
Medium Priority
Last Modified: 2010-05-01
I have an underlined label on a form indicating a web link and using the Label_MouseMove to change the mouse pointer then the Form_MouseMove to restore the Mouse Pointer to Default, but I don’t know what VB constant to use to change the Mouse Pointer to get the right look. I’m trying to mimic Windows Cursor hand when you hover over a web link.
Question by:jhanlon6
LVL 43

Accepted Solution

TimCottee earned 500 total points
ID: 8173571
Hi jhanlon6,

You are going a slightly complicated way about this. You can do it simply by setting two properties of the label itself:

.MousePointer = 99 ' Custom
.MouseIcon = <Path and filename of the icon you wish to use>

This way VB will automatically change the displayed mouse pointer when you are over the control, you do not have to worry about it yourself.


Brainbench MVP for Visual Basic

Experts-Exchange Advisory Board Member

Author Comment

ID: 8173743

Sorry took so long to respond, had to dig out the icon. Works like a charm, thanks.

Jack Hanlon

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…
Suggested Courses

572 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