You can't, not with that code. ShowDialog is a modal call, which means that it waits until the form being shown has closed before it continues executing - which means you can't close the form2 until form3 is finished. If you used Show instead, it would return immediately and you could use Close on the form, but that would have unpredictable effects since the instance of form3 is a part of form2, and if one is destroyed, then the other could go too.
There are two approaches which could do what you want:
1) Hide your form2, and close it after:
private void timer1_Tick(object sender, EventArgs e)
{
if (progressBar2.Value < 100)
{
progressBar2.Value += 2;
}
else
{
timer1.Stop();
Hide();
f3.ShowDialog();
Close();
}
}
2) Signal back to the parent form that you are finished, and would like form3 to be shown, by creating an event which the parent handles, and signalling it before closing yourself. The parent then decides to show the form and everything works happily.
I would go with the second option, and it isolates things better.