private void InventoryWindow_Shown(object sender, EventArgs e) { frmStockWindow = new StockWindow(); frmStockWindow.WindowState = FormWindowState.Maximized; frmStockWindow.FormBorderStyle = FormBorderStyle.None; frmStockWindow.TopLevel = false; currentForm = frmStockWindow; frmStockWindow.Size = pnlWindow.Size; pnlWindow.Controls.Clear(); pnlWindow.Controls.Add(frmStockWindow); frmStockWindow.Show(); }
private void btnStock_Click(object sender, EventArgs e) { ApplicationDesign.SetSubButtonDesign(ref sender); if (frmStockWindow != null) { frmStockWindow = new StockWindow(); frmStockWindow.WindowState = FormWindowState.Maximized; frmStockWindow.FormBorderStyle = FormBorderStyle.None; frmStockWindow.TopLevel = false; } currentForm = frmStockWindow; frmStockWindow.Size = pnlWindow.Size; pnlWindow.Controls.Clear(); pnlWindow.Controls.Add(frmStockWindow); frmStockWindow.Show(); }