private void Buying_btn_Click(object sender, EventArgs e) { if (BuyingForm == null) { BuyingForm = new Buying(); BuyingForm.MdiParent = this; forms_container.Controls.Add(BuyingForm); BuyingForm.FormClosed += new FormClosedEventHandler(form_closing); //BuyingForm.Dock = DockStyle.Fill; BuyingForm.Show(); BuyingForm.BringToFront(); } else { BuyingForm.Activate(); BuyingForm.BringToFront(); } }
private void form_closing(object sender, FormClosedEventArgs e) { HomeForm = null; UserForm = null; AccountsForm = null; BarcodesForm = null; BuyingForm = null; Customers_SuppliersForm = null; Demand_Desk_SalesForm = null; HomeForm = null; HRForm = null; ProductsForm = null; SaleForm = null; ShopsForm = null; StockForm = null; ToolsForm = null; UserForm = null; ReceiptForm = null; }