反选代码
Dim tv As WinForm.TreeView = e.Form.Controls("TreeView1")For Each nd As WinForm.TreeNode In tv.AllNodes nd.Checked = not nd.Checked
Next