Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

I try to get value for checked items in checklistbox
my problem is when I used timer to get value each minutes
invoke required ?
how can I solve this issue

C#
for (int i = 0; i < ContactsList.Items.Count; i++)
                if (ContactsList.GetItemCheckState(i) == CheckState.Checked)
                {
                    string mobileNo = ContactsList.Invoke(new MethodInvoker(delegate { ContactsList.SelectedValue[i]; }));
                }
Posted
Comments
Naveen Kumar Tiwari 20-Jun-15 5:05am    
why are you using timer?

1 solution

Why not just use the CheckedListBox.SelectedIndexChanged[^] event instead of a timer?
 
Share this answer
 

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