S
S
Spark1082016-05-13 20:04:16
visual studio
Spark108, 2016-05-13 20:04:16

How to make checkbox work in c#?

There is a checkbox named checkBox1 how do I open the form when the checkbox is active and close when it is deactivated.
I tried to do like this:

private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            PWC.com.spark108.craftm.console.form_console form_console = new PWC.com.spark108.craftm.console.form_console();

            if (console_Check.Checked)
            {
                form_console.Show();
            }
            else
            {
                form_console.Show();
            }
        }

But nothing happened.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zelimkhan Beltoev, 2016-05-13
@spark108

PWC.com.spark108.craftm.console.form_console form_console = new PWC.com.spark108.craftm.console.form_console();

private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (console_Check.Checked)
            {
                form_console.Show();
            } else
                form_console.Hide();
            {

            }
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question