private void button2_Click(object sender, EventArgs e) { this.Hide(); Form2 f1 = new Form2(); f1.Activate(); f1.Show(); }
private void button1_Click(object sender, EventArgs e) { Form f2 = new Form2(); f2.Visible = true; foreach (var item in f2.Controls) { if (item is Label) { ((Label)item).Text = this.textBox1.Text; f2.Activate(); } } }