'[记录上次操作的结点]
'[输入参数:树的名称]
'[操作:把刚才操作的结点突出显示]
Private Sub expandTreeNode(ByVal tns As TreeNodeCollection)
Dim treeNodeF As New TreeNode
Dim i, j As Integer
Try
If tns Is Nothing Then Return
j = tns.Count
For i = 0 To j - 1
treeNodeF = tns(i)
If Trim(treeNodeF.Text) = tmpStr Then
treeNodeF.Parent.Expand()
treeNodeF.ForeColor = Color.Blue
TreeView1.SelectedImageIndex = 0
Exit Sub
End If
expandTreeNode(treeNodeF.Nodes)
Next
Catch
MessageBox.Show(Err.Description, clewInfo, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
End Sub