Private Sub TreeView1_NodeMouseHover(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeNodeMouseHoverEventArgs) Handles TreeView1.NodeMouseHover
'// Check if there is a previous node. Set its font normal if there is.
If Not previousNode Is Nothing AndAlso Not previousNode.Equals(e.Node) Then
previousNode.NodeFont = New Font(TreeView1.Font, FontStyle.Regular)
End If
'// Set a bold font on the current hover node
e.Node.NodeFont = New Font(TreeView1.Font, FontStyle.Bold)
previousNode = e.Node
End Sub
Dim previousNode As TreeNode = Nothing
|