private void metroButton1_Click(object sender, EventArgs e) { //SqlCommand cmd = new SqlCommand("select * from Register where UName = '" + userText.Text + "' and PWord = '" + passText.Text + "'"); bool log = data.loginApproval(userText.Text, passText.Text); if (log == true) { thisUser = userText.Text; Profile pro = new Profile(); pro.Show(); this.Hide(); } else { loginLevel.Visible = true; } }