private void button2_Click(object sender, EventArgs e) { if (Reply.flag == "1") { Form7 newfrm = new Form7(); newfrm.Show(); this.Visible = false; } else { Form4 newfrm = new Form4(); newfrm.Show(); this.Visible = false; } }