protected void OnMenuItemSelected(string name) { MDIChild child = this.ActiveMdiChild as MDIChild; if (child != null) { child.AppendText(name); } }
protected void OnNewWindowSelected(object sender, EventArgs e) { MDIChild child = new MDIChild(this); child.MdiParent = this; child.Size = new Size(130, 130); child.Text = "Child" + _count++; child.Show(); OnMenuItemSelected("NewWindow"); }