I have 2 Forms. At init of 1st form I have code:
public App_Index()
{
InitializeComponent();
this.Hide();
Authorization loginForm = new Authorization();
loginForm.ShowDialog();
}
And if I push on Close button [X] on Form2 — App_Index(Form1) Form do .Show(); But no code in Form2 about this. I want to close Form1 and Form2 if I push [X] on Form2. How can I do this?
How about this? This closes the current form if the dialog is cancelled.