You can just subscribe to the FormClosed() event of "childForm" and show the main form again from there:
private void button1_Click(object sender, EventArgs e)
{
childForm child = new childForm();
child.Show();
child.FormClosed += new FormClosedEventHandler(child_FormClosed);
this.Hide();
}
void child_FormClosed(object sender, FormClosedEventArgs e)
{
this.Show();
}
Another option is to use ShowDialog():
private void button1_Click(object sender, EventArgs e)
{
childForm child = new childForm();
this.Hide();
child.ShowDialog();
this.Show();
}