Dim flag As Boolean = true
For Each nd As WinForm.TreeNode In trv.AllNodes
If nd.Checked = False Then
flag = false
exit for
End If
Next
If flag Ten
msgbox("全选")