private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox2.Text == "") { MessageBox.Show("please don't leave any textbox empty"); } else { Class1.name = textBox1.Text; Class1.address = textBox2.Text; main_menu ob = new main_menu(); ob.Show(); this.Close(); } }
private void button1_Click(object sender, EventArgs e) { Mainmenu = new main_menu(); Mainmenu.Show(); Hide(); }