[DllImport("kernel32.dll")]
static extern void Sleep(uint dwMilliseconds);
<DllImport("kernel32.dll", SetLastError:=True)> _
Public Sub Sleep(MilliSeconds As UInteger)
End Sub
Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
None.
This allows you to call 'Sleep(INT)' and force your application to sleep INT milliseconds.
Use this often with Application.DoEvents()
// code added by g. sharp @ http://www.paradisim.net
public class MainApp
{
[DllImport("kernel32.dll")]
static extern void Sleep(uint dwMilliseconds);
[STAThread]
public static void Main()
{
Sleep(U2000); // pause for two seconds
System.Threading.Thread.Sleep(2000); // does the same thing
}
}
<DllImport("kernel32.dll", SetLastError:=True)> _
Public Sub Sleep(MilliSeconds As UInteger)
End Sub
' code added by g. sharp @ http://www.paradisim.net
Public Class MainApp
<STAThread> _
Public shared Sub Main()
Sleep(2000) ' pause for two seconds
System.Threading.Thread.Sleep(2000) ' does the same thing
End Sub
End Class
Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Sleep 1000
System.Threading.Thread.Sleep()