Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (logar())
     {
         Inicial nf = new Inicial();//Object of the form that you want to open
         this.Hide();//Hide cirrent form.
         nf.Show();//Display the next form window
     }
     else
     {
         MessageBox.Show("Acesso não permitido");
     }
 }
Esempio n. 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Inicial nf = new Inicial();//Object of the form that you want to open
     this.Hide();//Hide cirrent form.
     nf.Show();//Display the next form window
 }