After executing ShowDialog(), the following code will not be executed before closing the child window.
public partial class Parent : System.Windows.Forms.Form
{
public Parent()
{
InitializeComponent();
}
private void toChild_Click(object sender, EventArgs e)
{
Child child = new Child();
this.Hide();
child.ShowDialog();
this.Close();
}
}