private void button1_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.Show(); Hide(); }
Button but = new Button(); but.Location = new Point(30,30); but.Text = "button1"; this.Controls.Add(but);