Imports System.Windows.Forms

Public Class frmTreeView
    Private _Nodes As TreeNodeCollection

    Public Sub New(Nodes As TreeNodeCollection)
        ' Dieser Aufruf ist für den Designer erforderlich.
        InitializeComponent()

        ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
        _Nodes = Nodes
    End Sub

    Private Sub frmTreeView_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        tvProfileMatch.BeginUpdate()
        tvProfileMatch.Nodes.Clear()

        For Each oNode As TreeNode In _Nodes
            tvProfileMatch.Nodes.Add(oNode.Clone())
        Next

        tvProfileMatch.Nodes.Item(0).Expand()
        'tvProfileMatch.ExpandAll()
        tvProfileMatch.EndUpdate()
    End Sub
End Class