Click here to Skip to main content
6,634,665 members and growing! (24,294 online)
Email Password   helpLost your password?
Languages » VB.NET » General     Intermediate

XP Link Label (VB 2005)

By marclile

A LinkLabel that mimics the ones in the task pane of windows explorer.
VB.NET 2.0, WinXP, WinForms, VS2005, Dev
Posted:4 Dec 2005
Views:34,378
Bookmarked:40 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
Prize winner in Competition "VB.NET Nov 2005"
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
20 votes for this article.
Popularity: 4.74 Rating: 3.64 out of 5
7 votes, 35.0%
1

2
1 vote, 5.0%
3
2 votes, 10.0%
4
10 votes, 50.0%
5

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.

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

marclile


Member

Location: United States United States

Other popular VB.NET articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 11 of 11 (Total in Forum: 11) (Refresh)FirstPrevNext
GeneralWhat exactly? Pinmemberismaildurmaz15:46 25 Jan '06  
GeneralRe: What exactly? Pinmembermarclile16:03 25 Jan '06  
GeneralRe: What exactly? Pinmemberdungeonsdarknight19:58 27 Jan '06  
GeneralReally Good Control PinmemberDennis Alexander Petrasch5:25 1 Jan '06  
GeneralRe: Really Good Control Pinmembercomputerguru9238217:54 23 Jan '06  
GeneralRe: Really Good Control Pinmembermarclile4:56 24 Jan '06  
GeneralRe: Really Good Control Pinmembercomputerguru9238215:02 24 Jan '06  
GeneralExplorerBar Control? Pinmemberarhoads766:21 8 Dec '05  
GeneralRe: ExplorerBar Control? Pinmembermarclile18:39 8 Dec '05  
GeneralRe: ExplorerBar Control? Pinmemberarhoads764:29 9 Dec '05  
GeneralRe: ExplorerBar Control? Pinmemberjklucker7:22 13 Dec '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 4 Dec 2005
Editor:
Copyright 2005 by marclile
Everything else Copyright © CodeProject, 1999-2009
Web21 | Advertise on the Code Project