Thanks a lot to helping hands :)
I am posting my final code to create a Button dynamically and related stuff too
{
Button button1= new Button();
button1.Location=new Point(220,457);
button1.Name="button1";
button1.Size=new Size(118, 39);
button1.Text = "Click This button ";
button1.UseVisualStyleBackColor = true;
button1.Click += new EventHandler(button1_Click);
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(" I am button1 , you just clicked me ");
}
you have created a button,
now below code will add the button1 to the form
Controls.Add(button1);
or if you want you can add the button1 to the panel1
panel1.Controls.Add(button9);