1、
BeforeExpandNode事件
If vars("允许") = false Then
e.cancel = True
End If
AfterLoad事件
vars("允许") = false
通过代码展开代码
vars("允许") = True
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.SelectedNode.Expand
vars("允许") = False
2、
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes
If nd.name = "aaa"
nd.Delete
End If
Next