MyTimers("计划1").Enabled = False Dim frm As Object = Windows.Forms.Form.ActiveForm If frm IsNot Nothing Then If frm.text = "窗口管理" Then Dim trv As Object = frm.controls("TreeView1") For Each nd As object In trv.Nodes output.show(nd.Text) Next End If End If