private void LogButEnter_Click(object sender, EventArgs e) { conexao.ConectarBanco(); if (conexao.verificaLogin(LogTxtUser.Text, LogTxtPass.Text) == 1) { this.Hide(); Desk main = new Desk(); main.Show(); conexao.objcon.Close(); } else { LogLabUser.ForeColor = Color.Red; LogLabPass.ForeColor = Color.Red; LogTxtUser.Text = ""; LogTxtPass.Text = ""; LogTxtUser.Focus(); } }
private void FrmLogin_Load(object sender, EventArgs e) { //conexao.ConectarBanco(); LogTxtUser.Focus(); }