private void FrmMenu_Load(object sender, EventArgs e) { timer1.Start(); if (uHelper == null) { FrmLogin vLogin = new FrmLogin(); vLogin.ShowDialog(); } if (uHelper.esValido && uHelper != null) { //ProcesarPermisos(); lblNombre.Text = "Bienvenido " + uHelper.usuario.sUsuario; } else { MessageBox.Show("Se require se autentifique", "Eror..", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void timer_Tick(object sender, EventArgs e) { FrmLogin v = new FrmLogin(); while (pb.Value < pb.Minimum) { pb.Value += 1; } if (pb.Value == pb.Minimum) { this.Opacity = this.Opacity - .01; if (this.Opacity == 0) { timer1.Stop(); this.Hide(); v.Show(); } } }