Re: Re: Delay

Posted by Jeff on March 01, 2001 at 18:23:37:

In Reply to: Re: Delay posted by Orior on January 28, 2001 at 13:00:06:

: i forgot one thing, i have delphi 2.

I just using delphi 3 months ago and I am a junior programmer using Delphi 5. I don't know if it'll work with Delphi 2. Here is a function that produces a delay in MilliSeconds.
-Place this just before the implementation
frmForm1: TfrmForm1;

Procedure Sleep(dwMilliseconds : LongWord); stdcall; external 'kernel32.dll';



Function call:
anywhere in your program:
Sleep(5000); // will cause a 5 second delay
Sleep(1000); // will cause a 1 second delay
Sleep(500); // will cause a 1/2 second delay