Give permissions to access only one particular form open in C# See more: C#

Last Reply 10 days ago By dharmendr

Posted 10 days ago

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);
            }
        }

 

You are viewing reply posted by: dharmendr 10 days ago.
Posted 10 days ago