Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")For Each nd As WinForm.TreeNode In trv.AllNodes nd.Checked = not nd.CheckedNext