VB: Wait Instruction

Solved
Maxime -  
 Steph -
Hello,
Does anyone know an instruction like Wait in VB6 that allows the program to pause for a certain amount of time, so as not to use a Timer?
Thank you

3 answers

  1. LBS
     
    Hello,

    in VB

    to declare in a module

    Public Declare Sub Sleep Lib "Kernel32.dll" (ByVal dwMillisenconds As Long)

    Usage afterwards

    Sleep ("Time in milliseconds")

    Ex: Sleep (5000) for a wait of 5 s
    8
    1. Steph
       
      Thank you very much, I needed the same function and it works great.
      0
  2. Marky710
     
    Excellent, it works perfectly!!!! :)

    Thank you
    0
  3. rachid
     
    Hello,

    yes there is a sleep command that allows the program to stop for a certain amount of time that you program yourself, this command uses Windows API technology, but I don't quite remember its syntax, do some research on the web to know the exact syntax, I would have liked to help you but my VB CD is no longer working.

    good luck
    -1