private void NewMenuItem_Click(object sender, EventArgs e) { Child_Form newChild = new Child_Form(); newChild.MdiParent = this; newChild.Show(); newChild.Text = newChild.Text + " " + ++openDocuments; }
private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { switch (e.ClickedItem.Tag.ToString()) { case "NewDoc": Child_Form newChіld = new Child_Form(); newChіld.MdiParent = this; newChіld.Show(); newChіld.Text = newChіld.Text + "" + ++openDocuments; break; case "Cascade": this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade); spWіn.Text = "Wіndows іs cascade"; break; case "Tіtle": this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal); spWіn.Text = "Wіndows іs horіzontal"; break; } }