循环判断不就行了?比如代码
Dim pnd As Object
If e.Node.ParentNode Is Nothing Then pnd = e.SenderElse pnd = e.node.ParentNodeEnd IfDim count As Integer = 0For Each nd As WinForm.TreeNode In pnd.Nodes If nd.Text = e.node.Text Then count += 1 End IfNextmsgbox(count)