title: Opening a file from a parent form into a child form's text box C#
body: <p>I'm new at c# and I'm having some difficulties with a project I'm doing. I have a mdi program with two forms. I need to open a file into a richTextBox in the child form (Form2) from the MenuStrip in the parent form (Form1). How do I get the richTextBox from the child form using a method from the parent form?  I don't know what I'm doing wrong. Any help would be much appreciated. The following is the code on my parent form. Thanks!</p>
  
  <pre><code>   private void openToolStripMenuItem_Click(object sender, EventArgs e)
      {
          OpenFileDialog openFileDialog1 = new OpenFileDialog();
          ofd.Filter = "Text Files|*.txt";
          openFileDialog1.Title = "";
          if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
          {
              Form2 f2 = new Form2();
              f2.MdiParent = this;
              f2.Show();
              StreamReader sr = new StreamReader(openFileDialog1.FileName);
              Text = sr.ReadToEnd();
              sr.Close();
  
  
          }
      }
  </code></pre>