I am trying to add the contents of a text file to a text box in a child form using 'Open' from the parent file. This is what I have so far:
{
openFileDialog1.InitialDirectory = Directory.GetCurrentDirectory();
// Display the file open dialog box and show only text files.
DialogResult responseDialogResult;
openFileDialog1.Filter = "Text Files (*.txt)|*.txt";
responseDialogResult = openFileDialog1.ShowDialog();
// Check that the user did not click the cancel button.
if (responseDialogResult != DialogResult.Cancel)
// Open the child form.
Form2 childOneForm = new Form2();
childOneForm.MdiParent = this;
childOneCountInteger++;
childOneForm.Text = openFileDialog1.FileName;
childOneForm.Show();