how can I add an item to a listbox when I am running a program loop
I have a listbox in window form. I will like to add items to the listbox and display the items while running a program loop. How can I accomplish this
for example:
ListBox list;
for(int i = 1; i < 50; i++)
{
list.Items.Add(i.ToString());
}
PROBLEM
The items in the ListBox will not display until the loopping has completed. This is not good enough. I want to be displaying information in the ListBox while the loop is still running.
Please help me.