private void Cancelar_Btn_Click(object sender, EventArgs e) { Tela_Cadastro Cadastro = new Tela_Cadastro(); Panel PainelCentral = new Panel(); PainelCentral.Dock = DockStyle.Fill; Cadastro.TopLevel = false; PainelCentral.Controls.Add(Cadastro); this.Controls.Add(PainelCentral); PainelCentral.BringToFront(); Cadastro.Show(); PainelCentral.Show(); }
private void Cadastro_btn_Click(object sender, EventArgs e) { if (Home_btn.Active) { Home_btn.selected = false; Home.Close(); } if (Solicitacao_btn.Active) { Solicitacao.Close(); } if (Atendimento_btn.Active) { Chat.Close(); } if (!Cadastro_btn.Active) { Cadastro_btn.Active = true; Cadastro = new Tela_Cadastro(); Cadastro.TopLevel = false; Cadastro.AutoScroll = true; this.Panel_Menus.Controls.Add(Cadastro); Cadastro.Show(); } if (Relatorios_btn.Active) { //Relatorios.Close(); } if (Abastecimento_Btn.Active) { //Abastecimento.Close(); } if (SAC_btn.Active) { Sac.Close(); } }