http://expert.csdn.net/Expert/topic/1793/1793753.xml?temp=.5592157

解决方案 »

  1.   

    Private Sub Command1_Click()
        Set TreeView1.Nodes("abcd2").Parent = TreeView1.Nodes("abce")
        Set TreeView1.Nodes("abce1").Parent = TreeView1.Nodes("abce")
    End SubPrivate Sub Form_Load()
        With TreeView1.Nodes
            .Add , , "abcd", "abcd"
            .Add "abcd", tvwChild, "abcd1", "abcd1"
            .Add "abcd", tvwChild, "abcd2", "abcd2"
            .Add "abcd2", tvwChild, "abcd201", "abcd201"
            .Add , , "abce", "abce"
            .Add "abce", tvwChild, "abce1", "abce1"
        End With
    End Sub
      

  2.   

    Private Sub Command1_Click()
        Set TreeView1.Nodes("abcd2").Parent = TreeView1.Nodes("abce")
        Set TreeView1.Nodes("abce1").Parent = TreeView1.Nodes("abce")
    End SubPrivate Sub Form_Load()
        With TreeView1.Nodes
            .Add , , "abcd", "abcd"
            .Add "abcd", tvwChild, "abcd1", "abcd1"
            .Add "abcd", tvwChild, "abcd2", "abcd2"
            .Add "abcd2", tvwChild, "abcd201", "abcd201"
            .Add , , "abce", "abce"
            .Add "abce", tvwChild, "abce1", "abce1"
        End With
    End Sub