How to "Wait" in VB6

Hi
If I want to wait 10 seconds in a function without locking the whole program, how to do?? I think there should be a "wait" function...
if I use SleepAPI, it will lock the program.
or how to implement it by Timer
Thanks
C8X
C8XAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
SiriusPConnect With a Mentor Commented:
Write your function

Function Name (params)
  code here
  timer1.interval = 10000
  timer1.enabled = true
  'write the rest of the code in the timer section
end function

sub timer1_timer
  put code here
  timer1.enabled = false
end sub
0
 
InteqamCommented:
very nice idea

0
 
SiriusPCommented:
you're welcome
and if your function uses a parameter,
you can always use the timer1.tag as a variable
0
 
C8XAuthor Commented:
That means there are no "wait" functions in VB?
0
All Courses

From novice to tech pro — start learning today.