I am having two forms as Form1 and Form2 on Form1 button click I am opening the form2 as follows
Code
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
Code
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
Code
if (DialogResult.OK == MessageBox.Show("Installation was done", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information)) { Form f1 = new Form (); f1.Show(); this.Close(); }
Dorababu MekaRank #457 · 5.5K reputationPosted Oct 25, 2016, 6:22 AM EDT
Salman BegRank #284 · 8.8K reputationPosted Oct 25, 2016, 2:01 AM EDT
Devi51 reputationPosted Oct 25, 2016, 4:24 AM EDT
Salman BegRank #284 · 8.8K reputationPosted Oct 25, 2016, 4:33 AM EDT