Sleep function Visual Basic

Is there a simple sleep function in Visual Basic that doens’t involve thread.

Something similiar like there exists in: C: sleep(1);

We also tried this code:

Declare Sub Sleep Lib "kernel32" (ByVal milliseconds As Long)
' pause for 5 seconds
Sleep 5000

…but it didn’t work. It gave me this error:

PInvokeStackImbalance was detected Message: A call to PInvoke function ‘Ganzenbordspel!Ganzenbordspel.Spel::Sleep’ has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.

Leave a Comment

tech