[DllImport("kernel32.dll")]
static extern void Sleep(uint dwMilliseconds);
Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Integer)
None.
This allows you to call 'Sleep(INT)' and force your application to sleep INT milliseconds.
Use this often with Application.DoEvents()
C#:
[DllImport("kernel32.dll")]
static extern void Sleep(uint dwMilliseconds);
// code added by g. sharp @ http://www.paradisim.net
public class MainApp
{
public static void Main()
{
Sleep(U2000); // pause for two seconds
System.Threading.Thread.Sleep(2000); // does the same thing
}
}
VB :
Sleep 1000
System.Threading.Thread.Sleep