Devi

Devi

  • NA
  • 55
  • 15.5k

Open Form1 as new instance after successful operations on Fo

Oct 25 2016 2:52 AM
I am having two forms as Form1 and Form2 on Form1 button click I am opening the form2 as follows
 
private Form2 form2; this.Hide(); form2.ShowDialog(); this.Show();

I have a back button and submit button on Form2 when I click on Back this is how I am showing Form1

this.Hide(); this.DialogResult = DialogResult.OK;

But when I submit the form I need to load the Form1 with new instance, this is what I tried but Form1 is showing multiple times

if (DialogResult.OK == MessageBox.Show("Installation was done", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information)) { Form f1 = new Form ();    f1.Show(); this.Close(); }
Can some one help me

Answers (4)