How to close a form and come back to mainform
<p>My question seems very easy but it's actually quite tricky. I search a lot on here and I dont find anything conclusive.</p>

<p>I have a mainform which need to be constantly open. I have a button which call a form2, I do some action on it, then call a form3 which let the user choose some item then close it and come back to mainform. The tricky part is i need to pass data from f3 to f1.</p>

<p>My problem is, on the second form I have a next &amp; cancel buttons (and a close button) . Next button hide f2, form1 "come back" &amp; call the form3. Why not call directly the form3? because I need to pass data from form3 to form1 so i <strong>Need</strong> to call form3 from form1.
So i want Cancelbutton (and closing button) to come back to form1 without calling form3.  I am not sure to be understood so here's my code</p>

<pre><code>public partial class Form1 : Form
    { 
 private void bouya_Click(object sender, EventArgs e)
        {
            Form2 form2 = new Form2();
            form2.ShowDialog();

            Form3 form3 = new Form3(); //it opens when form2 closes!!!
            form3.ShowDialog();

           string data1 = form3.label2.Text;  //the data i need, without calling form3 from here i can't pass data !!!
           //do some action with data1

        }
    }
</code></pre>

<p>form2 is very simple </p>

<pre><code> public partial class Form2 : Form
    {
  private void Next_Click(object sender, EventArgs e)
        { this.Hide(); }
  private void Cancel_Click(object sender, EventArgs e) 
        {//i just want here to cancel winform3 to be called}
    private void Form2_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {  // Actually this command does'nt work at all i tried 
//to put a messagebox.Show("bla") nothing happens but i would like to do the same}
</code></pre>

<p>}</p>

<p>And form3 I select an item from a list to be send to form1</p>

<pre><code>    public partial class Form3 : Form   
 {   
    private void button1_Click(object sender, EventArgs e)
            {
                foreach (Object obj in listBox1.SelectedItems)
                {
                    label2.Text = obj.ToString();
                    this.Hide();
                }
            }
    }
</code></pre>

<p>Ok for some of you my problem would seem useless and i complicated my code for nothing but i really need these form. (and i need to open form3 from form1 to send data 3 to 1)     </p>

<p>Forget about *Form1 form1 = new Form1(); it calls a new form1 and i don't want it !</p>