Your question is not clear and this answer will assume that you asked "How do I prevent a user changing the checkstate of a CheckedListBox item?".
It can be achieved via the ItemCheck event which occurs
before the checkstate has changed. The ItemCheckEventArgs gives the index of the item which is about to change, the current checkstate in CurrentValue and the
proposed new checkstate in NewValue. NewValue may be reassigned to change the behaviour of the control.
Changes to item 5 could be prevented like this
private bool lockItem5;
private void CheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
CheckedListBox clbx = (CheckedListBox)sender;
Debug.Print(@"""{0}"" Index:{1} Current:{2} New:{3}", clbx.Items[e.Index], e.Index, e.CurrentValue, e.NewValue);
if (e.Index == 5 && lockItem5) {
e.NewValue = e.CurrentValue;
Debug.Print("[{0}] change suppressed", e.Index);
}
}
To give some visual indication that the item has been locked the checkstate could be set to CheckState.Indeterminate just before lockItem5 is set to true. That way item 5 will look different to the others and a user might realise that clicking repeatedly is not going to make it change!
Alan.