dim NodeRoot as node '根节点
dim NodeChild as node '其余子节点
private sub command1_click()
set NodeRoot=treeview.nodes(1)
set NodeChild=NodeRoot.child
for each node in treeview.nodes
if node.key<>NodeRoot.key then
treeview.nodes.remove node.index
end if
next
'以下是本过程(点击本按钮要添加的内容)
end sub
另一按钮的操作同上