private void menu_writeTag_Click(object sender, EventArgs e) { if (!_licensedPorduct) { MessageBox.Show("the product is not licensed!"); return; } foreach (Form f in this.MdiChildren) { if (f.Tag.ToString() == writeFormTag) { f.BringToFront(); return; } } // Couldn't find one, so open on WriteTag1 newMDIChild = new WriteTag1(); newMDIChild.Tag = writeFormTag; // Set the Parent Form of the Child window. newMDIChild.MdiParent = this; // Display the new form. newMDIChild.WindowState = FormWindowState.Maximized; newMDIChild.Show(); //newMDIChild.WindowState = FormWindowState.Normal; newMDIChild.WindowState = FormWindowState.Maximized; }
private void HFDesk_Load(object sender, EventArgs e) { if (!_licensedPorduct) { return; } //show write tag form by default WriteTag1 newMDIChild = new WriteTag1(); newMDIChild.Tag = writeFormTag; // Set the Parent Form of the Child window. newMDIChild.MdiParent = this; // Display the new form. newMDIChild.Show(); newMDIChild.WindowState = FormWindowState.Normal; newMDIChild.WindowState = FormWindowState.Maximized; }