Example #1
0
        private void btnSair_Click(object sender, EventArgs e)
        {
            Close();
            TelaInicial telaInicial = new TelaInicial();

            telaInicial.Show();
        }
Example #2
0
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            string usuario, senha;

            usuario = txtUsuario.Text;
            senha   = txtSenha.Text;
            if (usuario == "" && senha == "")
            {
                TelaInicial telaInicial = new TelaInicial();
                telaInicial.Show();
                this.Visible = false;
            }
            else
            {
                MessageBox.Show("Entre com um usuário e senha", "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }