Hi, I'm using this code to check items from a checkedlistbox and see it in my listbox, I don't know what's the problem, I checked with a breakpoint and apparently the ItemCheck event is not being considered by the debugger.
Here's my code.

public void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            if (e.NewValue == CheckState.Checked)
            {



            listBox1.Items.Add(checkedListBox1.SelectedItem.ToString());
        }
        else 
        {
            listBox1.Items.Remove(checkedListBox1.SelectedItem.ToString());
        }
    }

    private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
        listBox1.Text = checkedListBox1.SelectedItem.ToString();
    }

I ran your code, and it seems to be working fine (although you should probably use e.Index instead of checkedListBox1.SelectedItem). Did you register the methods with the corresponding events, either through Visual Studio's properties panel, or with the following code (in the Form's constructor)?

checkedListBox1.ItemCheck += checkedListBox1_ItemCheck;
checkedListBox1.SelectedIndexChanged += checkedListBox1_SelectedIndexChanged;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.