Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") If trv.SelectedNode Is Nothing OrElse trv.SelectedNode.Index = trv.Nodes.Count - 1 Then trv.SelectedNode = trv.Nodes(0) Else For Each nd As WinForm.TreeNode In trv.AllNodes If nd.Index = trv.SelectedNode.Index + 1 Then trv.SelectedNode = nd Exit For End If Next End If