想在导航栏里加一个目录树,但这行代码不起作用,应该放在哪才有效,应如何设计:
Dim tr As WinForm.TreeViewDim nd As WinForm.TreeNodetr = Forms("窗口1").Controls("TreeView1")nd = Tr.Nodes.Add("Root1","根节点一")nd.Nodes.Add("Sub1","子节点一")nd.Nodes.Add("Sub2","子节点二")nd = Tr.Nodes.Add("Root2","根节点二")nd.Nodes.Add("Sub3","子节点三")nd.Nodes.Add("Sub4","子节点四")