Suspending Program Execution in Delphi 
Author Message
 Suspending Program Execution in Delphi

I'm trying to programmatically suspend program execution in delphi but
I can't find reference to any functions similar to a Sleep function
where you can provide the number of milliseconds to sleep. Any help
would be appreciated.

Bob Shehan

Web Life Productions, Inc.
http://www.*-*-*.com/



Sun, 20 Dec 1998 03:00:00 GMT  
 Suspending Program Execution in Delphi

Quote:

>I'm trying to programmatically suspend program execution in Delphi but
>I can't find reference to any functions similar to a Sleep function
>where you can provide the number of milliseconds to sleep. Any help
>would be appreciated.

>Bob Shehan

>Web Life Productions, Inc.
>http://www.weblifepro.com/

Bob:

You can implement a timer component, set its time and activate it. Then go into
a loop calling Application.Processmessages until the timer expires.
Alternatively you can do the same by putting a test for a particular time period
into the loop (i.e. current time - original time < delay time.)

See my home page at:
http://www.netcom.com/~dickmac/bcbest.html for "Boulder County's Best"
(not to be confused with "The Best of Boulder")



Tue, 22 Dec 1998 03:00:00 GMT  
 Suspending Program Execution in Delphi

Quote:

>I'm trying to programmatically suspend program execution in Delphi but
>I can't find reference to any functions similar to a Sleep function
>where you can provide the number of milliseconds to sleep. Any help
>would be appreciated.

Here's a sleep in seconds, change divisor to use milliseconds
or whatever...

-M

procedure sleep( S : LongInt);
{   /* Sleep for S Seconds */}
var
     EndTime : TDateTime;
begin
EndTime := Now + ( S / 86400);
while Now < EndTime do
     Application.ProcessMessages;
end;



Thu, 24 Dec 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Writing Simple Suspend/Resume Program in Turbo Pascal for DOS

2. Writing Simple Suspend/Resume Program in Turbo Pascal for DOS

3. Creating Alias During a Program Execution

4. Tracing program execution, & logging to file

5. program execution monitor........

6. Estimate the execution time of a program?

7. Program execution from Turbo Vision

8. How to allow the execution only from within Delphi IDE

9. How to allow the execution only from within Delphi IDE

10. Suspend current process for the remainding time slice

11. Change data type of colomn during execution

12. execution speed problems with dpmi

 

 
Powered by phpBB® Forum Software