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 WriteTag newMDIChild = new WriteTag(); 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 RFIDMain_Load(object sender, EventArgs e) { if (!_licensedPorduct) { return; } //show write tag form by default WriteTag newMDIChild = new WriteTag(); 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; }