|
-
Nov 7th, 2002, 08:56 PM
#1
Thread Starter
Addicted Member
Making a function wait a few
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.
-
Nov 7th, 2002, 10:15 PM
#2
Addicted Member
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
 Eat long and prosper! 
If someone helps you, find someone you can help.
If you still have time, click on the darn banner up there and help the forum! 
-
Nov 8th, 2002, 12:17 AM
#3
Thread Starter
Addicted Member
Hum, any way without a timer? Kinda like to keep all the code for this in one place..
Thanks.
-
Nov 8th, 2002, 03:06 AM
#4
Member
hOW ABOUT AS FOLLOW:
Private sub YourFunction()
Your function code....
Application.Doevents
thread.CurrentThread.sleep(1000)
end sub
-
Nov 8th, 2002, 12:39 PM
#5
Addicted Member
Ahh - I didn't know you could do that!
 Eat long and prosper! 
If someone helps you, find someone you can help.
If you still have time, click on the darn banner up there and help the forum! 
-
Nov 8th, 2002, 05:10 PM
#6
-
Nov 8th, 2002, 06:58 PM
#7
Thread Starter
Addicted Member
Yay it works, and i threaded the function so it doesnt lag anything.
.NET WILL LIVE ON! 
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|