private void NewMenuItem_Click(object sender, EventArgs e) { ChildForm1 newChild = new ChildForm1(); newChild.MdiParent = this; newChild.Text = newChild.Text + " " + ++openDocuments; newChild.Show(); }
private void ToolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { switch (e.ClickedItem.Tag.ToString()) { case "NewDoc": ChildForm1 newChild = new ChildForm1(); newChild.MdiParent = this; newChild.Show(); newChild.Text = newChild.Text + " " + ++openDocuments; break; case "Cascade": this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade); break; case "Tіtle": this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal); break; } }