private void customer_btn_Click(object sender, EventArgs e) { Customer_Form customer = new Customer_Form(); customer.TopLevel = false; customer.AutoScroll = true; this.show_panel.Controls.Add(customer); customer.Show(); }
private void account_btn_Click(object sender, EventArgs e) { Account_Form account = new Account_Form(); account.TopLevel = false; account.AutoScroll = true; this.show_panel.Controls.Add(account); account.Show(); Customer_Form customer = new Customer_Form(); if (Application.OpenForms.OfType <Customer_Form>().Any()) { customer.Close(); } }