Пример #1
0
        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;
            }
        }
Пример #2
0
        private void NewMenuItem_Click(object sender, EventArgs e)
        {
            ChildForm newChild = new ChildForm();

            newChild.Text      = newChild.Text + " " + ++openDocuments;
            newChild.MdiParent = this; newChild.Show();
        }