void tmr_Tick(object sender, EventArgs e) { //after 3 sec stop the timer tmr.Stop(); //display mainform login lf = new login(); lf.Show(); //hide this form this.Hide(); }
private void btnLogOut_Click(object sender, EventArgs e) { //forgiveness DialogResult result = MessageBox.Show("Are you sure you want to log out?", "Log out?", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (result.Equals(DialogResult.OK)) { //close menu form this.Hide(); //open login without player obj Form login = new login(); login.Show(); } else { //Do Nothing } }