Hello quick question here..
Ive got a function that changes some things in the UI and id like it to go a little slower... How would I it wait x milliseconds?..
CODE HERE
WAIT A FEW SECONDS
MORE CODE HERE
Thanks.
Printable View
Hello quick question here..
Ive got a function that changes some things in the UI and id like it to go a little slower... How would I it wait x milliseconds?..
CODE HERE
WAIT A FEW SECONDS
MORE CODE HERE
Thanks.
Here you go:
VB Code:
'In the General Declarations Dim i as Integer '------------------------------------------------------------------------------- Your Sub() MORE CODE HERE Timer1.Start() End Sub '------------------------------------------------------------------------------- Timer1_Tick() i = i + 1 If i = value Then CODE HERE Timer1.Stop() End If End Sub
gL,
Furry
Hum, any way without a timer? Kinda like to keep all the code for this in one place..
Thanks.
hOW ABOUT AS FOLLOW:
Private sub YourFunction()
Your function code....
Application.Doevents
thread.CurrentThread.sleep(1000)
end sub
Ahh - I didn't know you could do that! :D
the bad thing is that your program doesnt respond in that time :( umm unless you can call the sub as a separate thread?:confused:
Yay it works, and i threaded the function so it doesnt lag anything.
.NET WILL LIVE ON! :p
Thanks.