Private m_ctlTreeViewEx As TreeViewEx
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim objRootTreeNodeEx As TreeNodeEx
m_ctlTreeViewEx = New TreeViewEx()
Me.Controls.Add(m_ctlTreeViewEx)
m_ctlTreeViewEx.Left = 0
m_ctlTreeViewEx.Top = 0
m_ctlTreeViewEx.Dock = DockStyle.Fill
objRootTreeNodeEx = AddNodeToTreeView(m_ctlTreeViewEx.Nodes, _
"This is the first node", 12, 5)
AddNodeToTreeView(objRootTreeNodeEx.Nodes, "The second node", 4, 6)
AddNodeToTreeView(objRootTreeNodeEx.Nodes, "Third node", 0, 5)
AddNodeToTreeView(objRootTreeNodeEx.Nodes, "Node 4", 5, 1)
AddNodeToTreeView(objRootTreeNodeEx.Nodes, "Last node", -1, 0)
objRootTreeNodeEx.Expand()
End Sub