What is the function call to update a form during an event
I am updating one of my old vb6 programs. I have not touched vb6 for a number of years.
I cannot recall if there was a property on the form or a method call which would update form controls during an event.
The best way to articulate this was something like this.
In pseudo and while trying to avoid typing c# :)
button_click()
dim x as int = 0
while (x < 10000000)
txtNumber.Text = x.ToString
x = x + 1
end while
Curre开发者_StackOverflowntly, the txtNumber value does not update until the loop above has finished. Is there a form property or a method i must call to actual see the number increment?
thanks.
You want a DoEvents
statement which will yield to the forms message queue.
(Can't find the VB6 link so the posted one is for VBA but its information is correct) or you can call txtNumber.refresh
精彩评论