void Timer1Tick(object sender, EventArgs e) { this.Hide(); MainForm pri = new MainForm(); pri.Show(); timer1.Stop(); }
void CerrarSesion(object sender, EventArgs e) { if (MessageBox.Show("Realmente quieres cerrar sesion?", "AVISO",MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.Yes) { label4.Text = ""; label4.Text = ""; label4.Text = ""; MainForm frm1 = new MainForm(); this.Hide(); frm1.Show(); } }
void Button2Click(object sender, EventArgs e) { if (MessageBox.Show("Realmente quieres cerrar sesiĆ³n?", "AVISO",MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.Yes) { MainForm frm1 = new MainForm(); this.Hide(); frm1.Show(); } else{ SuperUsuario frm5 = new SuperUsuario(this.usuario); this.Hide(); frm5.Show(); } }
void AdminFormClosing(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Realmente quieres cerrar sesion?", "AVISO",MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.Yes) { MainForm frm1 = new MainForm(); this.Hide(); frm1.Show(); } else{ Admin frm = new Admin(this.usuario); this.Hide(); frm.Show(); } }