老师,
For Each bt As object In Forms("通用目录树").Controls
If Typeof bt Is WinForm.TreeView Then '判断控件是否是目录树
Dim trv As WinForm.TreeView = Forms("通用目录树").Controls(bt.name)
If drp.Text > "" Then '如果内容不为空
For Each nd As WinForm.TreeNode In trv.AllNodes
If nd.Text.IndexOf(drp.Text) >= 0 Then
trv.StopRedraw()
trv.SelectedNode = nd
nd.EnsureVisible()
trv.ResumeRedraw()
Exit For
else
trv.SelectedNode = nothing 这块怎么写
End If
Next
End If
End If
Next