Sleep Function in VB.NET
In Visual Basic 6.0, we used the Sleep API function to allow the process to ‘sleep’ for specified time interval. VB.NET comes up with an sleep function on its own
The argument 500 in the above code specified the number of milliseconds for which the thread is blocked.
Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute.
Specify Infinite to block the thread indefinitely.