Introduction
This is a custom TreeView control which provides a Windows Vista look.
Background
The code is a combination of three different codes made by José Manuel Menéndez Poo, Xasthom, and Stephen J Whiteley. As most of the code is made by Stephen, his copyright messages have been left.
This code is a part of the SQLmail.org project, an Open Source project whose goal is to make a MySQL based mail client. All messages should be stored in a SQL database which will provide extremely fast search. As I would like to have Windows Vista look for the whole program, almost all controls are customized. In the SQLmail.org project, you can find a Vista customized button, a radio button, a checkbox, a toolstrip, and a datagrid, and the way to use them.
Using the Code
It is very easy to use this control. Download the class from the link at the top of the page and import it in your project. Build your project, and you will find it as a new control in the Toolbox.
You can use a custom node like this:
Dim NewNode As New WindowsVistaNode
NewNode.Name = "myname"
NewNode.Text = "text"
NewNode.ImageKey = "image.gif"
NewNode.SelectedImageKey = "image.gif"
NewNode.Font = New Font(TreeView1.Font.FontFamily, _
TreeView1.Font.Size, FontStyle.Bold)
NewNode.Title = True
NewNode.Text = UCase(NewNode.Text)
Folder_Tree.Nodes.Add(NewNode)