using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Sample { public partial class Form1 : Form { public Form() { InitializeComponent(); } private void toolStripMenuItem1_Click(object sender, EventArgs e) { } private void newMenuItem_Click(object sender, EventArgs e) { } private void openToolStripMenuItem_Click(object sender, EventArgs e) { From2 newMDIChild = new From2(); newMDIChild.MdiParent = this; newMDIChild.Show(); } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Sample { public partial class Form2 : Form { public Form2() { InitializeComponent(); } private void From2(object sender, EventArgs e) { } private void closebutton_Click(object sender, EventArgs e) { this.Close(); } private void Selectbutton_Click(object sender, EventArgs e) { this.Hide(); ((Form1)this.MdiParent).Viewmenuitem.Enabled = true; } } }
this.menuStrip1.AllowMerge = false;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)