private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { switch (e.ClickedItem.Tag.ToString()) { case "NewDoc": ChildForm newChild = new ChildForm(); newChild.MdiParent = this; newChild.Show(); newChild.Text = newChild.Text + " " + ++openDocuments; break; case "Cascade": this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade); spWin.Text = "Windows is cascade"; break; case "Title": this.LayoutMdi (System.Windows.Forms.MdiLayout.TileHorizontal); spWin.Text = "Windows is horizontal"; break; } }
private void NewMenuItem_Click(object sender, EventArgs e) { ChildForm newChild = new ChildForm(); newChild.Text = newChild.Text + " " + ++openDocuments; newChild.MdiParent = this; newChild.Show(); }