Having a main form with a button with which I access the second form, how can I return to the main form by closing the second form with the x button?
Form1:
private void buttonEnterAdmin_Click(object sender, EventArgs e)
{
this.Hide();
Login login = new Login();
login.Show();
}
Form2:
private void Login_FormClosed(object sender, FormClosedEventArgs e)
{
Main main = new Main();
main.Show();
}