I don' t know why that doesn't work. Any form isn't shown.
Because you are checking the dialogresult without actually showing the form to the user and asking him to press ok or cancel.
do it like this
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form f = new Form2();
if(f.ShowDialog() == DialogResult.OK) // note the change here.
Application.Run(new Form1());