Code Snippet
public SampleControl(int width, int height)
{
Application.EnableVisualStyles();
Panel frame = new Panel();
frame.BorderStyle = BorderStyle.FixedSingle;
frame.SetBounds(0, 0, width, height);
frame.Parent = this;
Btest.BackColor = Color.LightGray;
Btest.Text = "TEST";
Btest.Location = new Point(243, 183);
Btest.Size = new Size(127, 36);
Btest.FlatStyle = FlatStyle.System;
Btest.Click += new System.EventHandler(this.Btest_Click);
frame.Controls.Add(Btest);
.....
}