Dynamically load an assembly and invoke the UserControl in the the Assembly  
Author Message
ANDE





PostPosted: Visual C# General, Dynamically load an assembly and invoke the UserControl in the the Assembly Top

hi

i have built and assembly whihc consists of meny UserControls.

Now i need to associate each UserControl to a tree view. when i click on one node of the tree view corresponding UserControl should be loaded on the main form.

How can i do this




Visual C#2  
 
 
Prasant Swain





PostPosted: Visual C# General, Dynamically load an assembly and invoke the UserControl in the the Assembly Top

you can try like this.

YourControl newcontrol = new YourControl();

newcontrol.name = "sdfsd";

newcontrol.left = 10;

newcontrol.top = 10;

this.controls.Add(newcontrol); //add the control in the form.