示例#1
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     OpenFileDialog openFileDialog1 = new OpenFileDialog();
     DialogResult result = openFileDialog1.ShowDialog();
     StreamReader sr = new StreamReader(openFileDialog1.FileName);
     ChildForm newChild = new ChildForm();
     newChild.MdiParent = this;
     newChild.Show();
     newChild.ActiveControl.Text = sr.ReadToEnd();
     sr.Close();
 }
示例#2
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ChildForm newChild = new ChildForm();
     newChild.MdiParent = this;
     newChild.Show();
 }