Dim tv As WinForm.TreeView = e.Form.Controls("TreeView1")For Each nd As WinForm.TreeNode In tv.AllNodes If nd.Checked Then
all = false
exit for
End IfNext
if all then
代码......
end if