title: close a program completely in c#
body: <p>i Have made a program in c# which show 2 types of form 1 is getting values from the user and save it in Database and second is showing those values in a template of crystal report.</p>
  
  <p>My problem is when i move 1st form to 2nd form i hide the first form by using hide(); function and after getting the value on 2nd form from Database i move back to 1st form and hide the second form and show 1st but when i close the whole program it keep running and debugger showing its and running and also have a process in task manager.</p>
  
  <p>I want to know how can i close that background process with the form1 close. sorry for my  bad English.</p>
  
  <pre><code>      rollno = txtrollno.Text;
                      ReportCard objreport = new ReportCard();
                      objreport.Show();
                      this.Hide();
  </code></pre>
  
  <p>this is the code for hiding the 1st form .</p>
  
  <pre><code> Form1 objshow = new Form1();
          objshow.Show();
          this.Hide();
  </code></pre>
  
  <p>and in this i hide 2nd and show 1st again.</p>