private void txtLogin_Click(object sender, EventArgs e) { this.Hide(); TelaLogin1 a = new TelaLogin1(); a.Closed += (s, args) => this.Close(); a.Show(); }
private void telaInicial_Load(object sender, KeyPressEventArgs e) { if ((Keys)e.KeyChar == Keys.Enter) { this.Hide(); TelaLogin1 a = new TelaLogin1(); a.Closed += (s, args) => this.Close(); a.Show(); } }