Click here to Skip to main content
12,451,243 members (51,079 online)
Click here to Skip to main content
Add your own
alternative version

Stats

46.6K views
171 downloads
43 bookmarked
Posted

XP Link Label (VB 2005)

, 4 Dec 2005 CPOL
Rate this:
Please Sign up or sign in to vote.
A LinkLabel that mimics the ones in the task pane of Windows Explorer.

Introduction

This is my first attempt at making my own control. It mimics the LinkLabel that XP uses in the task pane on the left hand side of Explorer windows.

Screenshot of the real LinkLabels:

Sample image

The screenshot below shows the control at design time. As you can see, it has a "Smart Tag" with it, and the code also shows how to remove properties from the Properties panel that you don't want users to change.

Sample image

I know that you can probably just take a normal LinkLabel and add an image to it to make it look kind of like this, but I wanted to figure out how to add my own Smart Tags and display the real hand cursor when you hovered over it. The hand cursor that displays on this control is not the one that is built into VS. It's the real one from XP, with the shadow under it.

Take a look at it if you want and, by all means, leave me comments. I wasn't really sure how to do the drawing of the image and text, I was just winging it, so I'm sure there are better ways of doing it.

Update

I noticed that the mouse cursor was flickering when it left the control, and figured out that it was the following line:

SetCursor(0)

If you have downloaded the demo, remove the above line for a smoother MouseLeave.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

marclile
United States United States
No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
QuestionWhat exactly? Pin
ismaildurmaz25-Jan-06 14:46
memberismaildurmaz25-Jan-06 14:46 
AnswerRe: What exactly? Pin
marclile25-Jan-06 15:03
membermarclile25-Jan-06 15:03 
GeneralRe: What exactly? Pin
dungeonsdarknight27-Jan-06 18:58
memberdungeonsdarknight27-Jan-06 18:58 
GeneralReally Good Control Pin
Dennis Alexander Petrasch1-Jan-06 4:25
memberDennis Alexander Petrasch1-Jan-06 4:25 
GeneralRe: Really Good Control Pin
computerguru9238223-Jan-06 16:54
membercomputerguru9238223-Jan-06 16:54 
GeneralRe: Really Good Control Pin
marclile24-Jan-06 3:56
membermarclile24-Jan-06 3:56 
GeneralRe: Really Good Control Pin
computerguru9238224-Jan-06 14:02
membercomputerguru9238224-Jan-06 14:02 
QuestionExplorerBar Control? Pin
arhoads768-Dec-05 5:21
memberarhoads768-Dec-05 5:21 
AnswerRe: ExplorerBar Control? Pin
marclile8-Dec-05 17:39
membermarclile8-Dec-05 17:39 
GeneralRe: ExplorerBar Control? Pin
arhoads769-Dec-05 3:29
memberarhoads769-Dec-05 3:29 
GeneralRe: ExplorerBar Control? Pin
jklucker13-Dec-05 6:22
memberjklucker13-Dec-05 6:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160826.1 | Last Updated 4 Dec 2005
Article Copyright 2005 by marclile
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid