private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { welcome obj = new welcome(); this.Hide(); obj.Show(); }
private void button1_Click(object sender, EventArgs e) { String Uname1 = "shreyas", Upass1 = "1234", Uname2 = "sai", Upass2 = "1234", name, pass; name = textBox2.Text; pass = textBox1.Text; if ((Uname1.Equals(name) && Upass1.Equals(pass)) || (Uname2.Equals(name) && Upass2.Equals(pass))) { label3.Hide(); welcome obj = new welcome(); this.Hide(); obj.Show(); } else { label3.Show(); textBox1.Text = ""; textBox2.Text = ""; } }