|
-
Jul 13th, 2001, 08:23 AM
#1
Thread Starter
Hyperactive Member
timer
How can i put a timer between events .. I mean . If the program is dont processing a line then i want it to wait for 3 seconds and then start processing again .
-
Jul 13th, 2001, 08:29 AM
#2
Member
That sounds like multithreading. Can you be more clear? Do you mean you just want your program to do nothing for 3 seconds, or allow other parts of your program to execute for 3 seconds while the other part waits?
-
Jul 13th, 2001, 08:29 AM
#3
Addicted Member
Use the sleep Api
Code:
Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
Use it like this:
Sleep(3000) 'for 3 seconds
"Computers are incredibly fast, accurate and stupid. Human beings are incredibly slow, inaccurate and brilliant. Together they are powerful beyond imagination." - Albert Einstein
-
Jul 13th, 2001, 08:31 AM
#4
Thread Starter
Hyperactive Member
well the other parts are alredy executing ..
Well may be there is an easier way to do it ... But cause i am new to VB so i dont know all the shorcuts ... I want a lable to flash ..
I am using it kind of like a process indicator ....
so i want to use a timer so that it flashes every second or something..
I hope you understand what i am saying
-
Jul 13th, 2001, 08:31 AM
#5
Hyperactive Member
Set the timer.enabeled = false when you start processing and when it's done processing to timer.enabeled = true this will do the trick i think
Grtz,
Bloged
-
Jul 13th, 2001, 08:35 AM
#6
Addicted Member
-
Jul 13th, 2001, 08:38 AM
#7
Member
But if you want the label to flash at a constant rate, you can't necessarily rely on a timer. You may want to try multithreading. ...But if you are newish to VB or the concept of threads, just use the timer.
-
Jul 13th, 2001, 08:43 AM
#8
Thread Starter
Hyperactive Member
Well i am not really that new to VB .. and i do have the concept about multi threads .. but unfortunately i never really got to use it ... But i think that it should be soemthing interesting to learn ...
-
Jul 13th, 2001, 08:44 AM
#9
Member
Interesting doesn't begin to describe it.
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
|