if checked checkbox chksetting, then login admin access only setting form not click other button like frmmanual (name of check box chkSettings, chkmanual there are 2 check boxes & name of my form frmsetting, frmmanual, frmhome) in frmhome add button (btnmanual, btnsetting) when i click btnsetting then open setting form & then btnmanual not open form on button click c# windows application?
private void btnSettings_Click(object sender, EventArgs e)
{
//frmSettings setting = new frmSettings();
//this.Hide();
//setting.ShowDialog();
//this.Close();
try
{
if (lblAuth.Text == "yes")
{
var Setting = frmLogin.FormHome;
frmSettings setting = new frmSettings();
dal.change_screen(Setting, setting);
this.Hide();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "btnSettings_Click,frmHome", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}