窗口1中的目录树NodeMouseClick
If Forms("窗口2").Opened = False Then
Forms("窗口2").Open()
End If
Dim tr As WinForm.TreeView = Forms("窗口2").Controls("TreeView1")
Dim nd As WinForm.TreeNode
For Each nd In tr.AllNodes
If nd.DataRow("_Identify") = e.Node.DataRow("_Identify") AndAlso nd.Name = e.Node.Name AndAlso nd.Index = e.Node.Index Then
tr.CollapseAll()
nd.EnsureVisible()
Exit For
End If
Next