static void Main(String[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); txtProduto prod = new txtProduto(); frmLogin login = new frmLogin(); frmAdd add = new frmAdd(); frmMain main = new frmMain(); if (login.ShowDialog() == DialogResult.OK) { main.ShowDialog(); } //if (main.ShowDialog() == DialogResult.OK) //{ // Application.Run(new frmAdd()); //} //else //{ // Application.Exit(); //} //if (main.ShowDialog() == DialogResult.Yes) //{ // Application.Run(new frmBusca()); //} //if (add.ShowDialog() == DialogResult.Retry) //{ // Application.Run(new frmMain()); //} //else //{ // Application.Exit(); //} }
private void btnAdd_Click(object sender, EventArgs e) { frmAdd add = new frmAdd(); add.ShowDialog(); }