private void button1_Click(object sender, EventArgs e) { this.Hide(); Form f = new frm_login(); f.Closed += (s, args) => this.Close(); f.Show(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); frm_login frm = new frm_login(); frm.ShowDialog(); if (frm.logado == true) { Application.Run(new frm_menu()); } }