increments, it gets passed to a label. The idea was to display a rapidly incrementing number, unfortunately
when I run the loop, the program counts to the max amount for i, and then passes the final i value to the
I then tried to do the same thing, but instead of sending it to the label, I added i to a listbox. The same
thing happended, but instead of only rendering the final value for i, it waited until the loop had
finished, then rendered every value for i.
I've asked around and apparently it has something to do with "threads"? Is there anywhere that has an
explanation for this?
More importantly though, how could I deal with the render delay for listboxes, or the problem with the
label? I have seen a solution that slows down the counting using a timer, but this seems like a work around
more than a solution. I understand that the label is recieving a new number to display before it has
finished rendering the last number, but surely there must be a way to speed up the rendering. I mean
slowing down the counting deliberately sounds counter-intuitive to me, let alone bad programming practice...
Anyway, here's the code I used for the label:
Dim i As Integer i = 0 While i < 100 i += 1 Label11.Text = i End While
And here's the listbox:
Dim i As Integer i = 0 While i < 100 i += 1 ListBox2.Items.Add(i) End While
Thanks for your help