textchanged事件
Dim drp As WinForm.DropDownBox = e.sender
If drp.DroppedDown Then '如果下拉窗口已经打开
Dim txt As String = Forms("窗口1").DropDownBox.Text
If txt = "" Then
Return
End If
Dim trv As WinForm.TreeView = Forms("窗口1").Controls("TreeView1")
'e.Form.StopRedraw
'trv.StopRedraw
Dim p As WinForm.TreeNode
For i As Integer = 0 To trv.AllNodes.count - 1
Dim nd As WinForm.TreeNode = trv.AllNodes(i)
If nd.Text.IndexOf(txt) >= 0 Then
nd.EnsureVisible
Application.Doevents
End If
Next
'trv.ResumeRedraw
'e.Form.ResumeRedraw
End If