title: A new window called twice after the mainForm, but first Form not being closed
body: <p>i have a problem:</p>
  
  <p>Here is my case:</p>
  
  <p>i already command a NewForm to be called everytime the user select that. The MainForm is being called when i run the program, and when i click "NewForm", the FirstNewForm being called and the MainForm is closed. But, when i click "NewForm" again in the FirstNewForm that i had created, it called the SecondNewForm, but the FirstNewForm is not being closed.</p>
  
  <p>Here is my question:</p>
  
  <p>How do i close the FirstNewForm? i mean, how do i close a CurrentForm whenever i called a NewForm?</p>
  
  <p>Here is the image when i command a "NewForm" when the MainForm still in there, and MainForm is closed when FirstNewForm being called: (if you see in the taskbar, just one Selling System Program in there): (The first image is MainForm, and the second image is FirstNewForm, it looked the same, because the MainForm already closed when i called a FirstNewForm):</p>
  
  <p><img src="https://i.stack.imgur.com/xqFuI.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/vKBCL.png" alt="enter image description here"></p>
  
  <p>Here is the image when i command a "NewForm" when the FirstNewForm still in there, and FirstNewForm is not being closed when SecondNewForm being called: (if you see in the taskbar,there are two Selling System Programs in there, so the FirstNewForm is not being closed)</p>
  
  <p><img src="https://i.stack.imgur.com/Ebyn9.png" alt="enter image description here"></p>
  
  <p>How do i hide and close the FirstNewForm?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>private void AddNewForm(object sender, EventArgs e)
      {
          //this.Hide();
          Form newForm = new Form();
          AddObjects(sender, e, newForm);
          UpdateTextPosition(sender, e, newForm);
  
          newForm.Size = new Size(1360, 735);
          newForm.Text = "Selling System";
          newForm.FormBorderStyle = FormBorderStyle.Fixed3D;
          newForm.AutoScaleMode = AutoScaleMode.Font;
          newForm.AutoScroll = true;
          newForm.AutoSizeMode = AutoSizeMode.GrowAndShrink;
          newForm.StartPosition = FormStartPosition.CenterScreen;
          newForm.MaximizeBox = false;
          newForm.Controls.Add(label1);
          newForm.Controls.Add(label2);
          newForm.Controls.Add(label3);
          newForm.Controls.Add(label4);
          newForm.Controls.Add(label5);
          newForm.Controls.Add(label6);
          newForm.Controls.Add(label7);
          newForm.Controls.Add(menuStrip1);
  
          //newForm.ShowDialog();
  
          //this.Close();
  
          if(this.InvokeRequired)
          {
              Action act = () =&gt;
              {
                  this.Hide();
              };
  
            this.Invoke(act);
          }
  
          else
          {
            this.Hide();
          }
      }
  </code></pre>
  
  <p>Thanks in advance! and sorry if i am post a long posting</p>