I want to load the usecontrol created in the project dynmically/programmtically. Eg: I have one form, and a number of usercontrols. The usercontrol should be pasted / loaded into the form.
Usercontrol
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

try abcRank #6,639 · 260 reputationPosted Nov 29, 2007, 11:18 PM EST
System.Windows.Forms.Button b1;
b1=new Button();
b1.Text=i.ToString();
b1.Width=35;
b1.Height=20;
b1.Top = 10;
b1.Left =20;
b1.Name="Mybutton";
b1.Click+=new EventHandler(ButtonClick); // if u want to add event handler
form1.Controls.Add(b1);