The easiest way to do this is to have a controlling function that opens both of the forms. When the button is clicked on the first form, close it and move onto the second form.
using (var form1 = new Form1() ) {
form1.ShowDialog();
}
using (var form2 = new Form2()) {
form2.ShowDialog();
}
The code for WPF is similar. The biggest difference is that WPF windows (and pretty much all classes as a rule) do not implement IDisposable and hence do not require the using statement.
var win1 = new Window1();
win1.ShowDialog();
var win2 = new Window2();
win2.ShowDialog();