//Logout Button private void LockBtn_Click(object sender, EventArgs e) {//Hiding all Ui elements UserLabel.Hide(); UserBtn.Hide(); DetectBtn.Hide(); TrainBtn.Hide(); LockBtn.Hide(); ExitBtn.Hide(); mark2.Hide(); LoginPanel.Show(); LoginPanel.Dock = DockStyle.Fill; LoginPanel.BringToFront(); NameBox.Text = ""; PassBox.Text = ""; }