private void newWindowToolStripMenuItem_Click(object sender, EventArgs e) { ChildForm child = new ChildForm(); child.MdiParent = this; child.Show(); }
private void button1_Click(object sender, EventArgs e) { ChildForm newChild = new ChildForm(); newChild.MdiParent = this; newChild.Show(); }
private void menuItem3_Click(object sender, System.EventArgs e) { //Close the active child form ChildForm activeMdiChild = (ChildForm)this.ActiveMdiChild; activeMdiChild.Close(); }
private void menuItem2_Click(object sender, System.EventArgs e) { //Create a new child form ChildForm newMDIChild = new ChildForm(); newMDIChild.MdiParent = this; //Show the new child form newMDIChild.Show(); }
private void Form1_MdiChildActivate(object sender, System.EventArgs e) { ChildForm activeMdiChild = (ChildForm)this.ActiveMdiChild; if (activeMdiChild == null) { return; } //Set the ToolbarControl's buddy axToolbarControl1.SetBuddyControl(activeMdiChild.ActiveControl); }
private void newWindowToolStripMenuItem_Click(object sender, EventArgs e) { ChildForm child = new ChildForm(); child.MdiParent = this; child.Show(); // the following code creates a new FontDialog object called // fontDlg and runs the method ShowDialog() method as well FontDialog fontDlg = new FontDialog(); fontDlg.ShowDialog(); }
private void menuItem2_Click(object sender, System.EventArgs e) { //Create a new child form //int i=0; ChildForm newMDIChild = new ChildForm(this); newMDIChild.MdiParent = this; mdiform_sum++; newMDIChild.Name = "MDIChild" + mdiform_sum.ToString(); newMDIChild.Text = "地图工程" + mdiform_sum.ToString(); //Show the new child form newMDIChild.Show(); }