dim e = args(0)
Dim tv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim txt As String = e.Sender.Text
e.Cancel = True
If tv.AllNodes.Count > 0 AndAlso e.KeyCode = Keys.Enter Then
Dim pn As WinForm.TreeNode = vars("pn")
vars("F") = False
For Each nd As WinForm.TreeNode In tv.AllNodes
If vars("F") = False
If pn Is Nothing
vars("F") = True
ElseIf pn.FullName = nd.FullName
vars("F") = True
Continue For
End If
End If
If vars("F") = True AndAlso nd.Text.Contains(txt) = True Then
tv.SelectedNode = nd
vars("pn") = nd
nd.EnsureVisible
Return ""
End If
Next
vars("pn") = Nothing
End If
Functions.Execute("某函数",e)