Click here to Skip to main content
15,357,293 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have 10 checkboxes, if selected 2 checkboxes(form1,form2), then I should open 2 selected forms and the rest of the forms should not be open  on button click in c# 
in c# winform
thanks for advance

What I have tried:

i have no idea how to do please help me.
Updated 30-Mar-21 20:57pm
Maciej Los 31-Mar-21 2:14am
We know now what you want... But what you have tried till now?
Member 11893460 31-Mar-21 6:51am

if (lblAuth.Text == "no")
var Setting = frmLogin.FormHome;
frmManual manual = new frmManual();
dal.change_screen(Setting, manual);
catch (Exception ex)
MessageBox.Show(ex.Message, "btnManual_Click,frmHome", MessageBoxButtons.OK, MessageBoxIcon.Error);
Member 11893460 31-Mar-21 7:09am
i try this code but this code not correct
Richard MacCutchan 31-Mar-21 4:01am
Test each checkbox in turn:
If it is set:
    If the form is not open then open the form
    Else do nothing
If it is not set:
    If the form is open then close the form
    Else do nothing

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900