i want to enable the next form through this code. But its not working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zaid Sharif
    New Member
    • Feb 2010
    • 2

    i want to enable the next form through this code. But its not working.

    Code:
    if (checkBox1.Checked == true)
                {
                    button1.Enabled = true;
                }
                else
                {
                    button1.Enabled = false;
                }
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Try this as the handler for your CheckBox1_Check Changed event
      Code:
      button1.enabled = checkBox1.Checked;

      Comment

      Working...