G
Guest
I have a sub which needs to do some things then wait a specified length of
time before going on. I tried adding a timer with counter in its tick event
then checking the state of the counter in the subprocedure. But this doesn't
work:
dim progress as single
Sub mysub
stuff
timer1.enabled = true
while progress <1
textbox1.text=progress
end while
more stuff
end sub
timer1 tick event handler
progress = progress +.01
end
The textbox shows me that nothing is happening. The program hangs up.
What's the right way to do this? Should this be a threading application?
time before going on. I tried adding a timer with counter in its tick event
then checking the state of the counter in the subprocedure. But this doesn't
work:
dim progress as single
Sub mysub
stuff
timer1.enabled = true
while progress <1
textbox1.text=progress
end while
more stuff
end sub
timer1 tick event handler
progress = progress +.01
end
The textbox shows me that nothing is happening. The program hangs up.
What's the right way to do this? Should this be a threading application?