Hello, I'm using C # to create a login system. And I would like to know some formula to close this login window without stopping the application. I used this.Hide (); to hide the form, but when closing the program it keeps running only hidden. Can someone help me? Remember that typing the correct username and password will call another form.
This is the code I am using:
if (usuarioTextBox.Text == "Administração" && senhaTextBox.Text == "@dmin321")
{
MessageBox.Show("Acesso Permitido");
this.Hide();
Form2 novoFormulario = new Form2();
novoFormulario.Show();
}