Ah, so you want to create a new instance of a specific usercontrol based on the selected treeview node?
It can be done using Activator.CreateInstance, but I wouldnt recommend it. I would do something like this:
vb Code:
Select Case tvSettings.SelectedNode.Name Case "Database" Dim uc As New ucDatabase uc.Location = New Point(50, 50) Me.Controls.Add(uc) Case "Advanced" Dim uc As New ucAdvanced uc.Location = New Point(50, 50) Me.Controls.Add(uc) End Case




Reply With Quote