greetings all.

this is my first post on these forums so excuse me if i'm not familier with etiquettes!

im looking for a way of making my program wait before continuing on to the next line of code. i know a function does exist, it is even one i have used before! but since then i've both deleted the program i used it on and forgotten all about it!

my aim is to use loops to make a repeating change to a component, but with time before each repetition so that the user can see the effect. i hope this makes sense.

i have had a brief search of the forum and not found this listed else where but i apologise in advance if my search wasn't thorough enough!

thanks very much

Recommended Answers

All 6 Replies

Are you looking for Delay() ?

Just add a readkey and it will wait until you press a key =/

greetings all.

this is my first post on these forums so excuse me if i'm not familier with etiquettes!

im looking for a way of making my program wait before continuing on to the next line of code. i know a function does exist, it is even one i have used before! but since then i've both deleted the program i used it on and forgotten all about it!

my aim is to use loops to make a repeating change to a component, but with time before each repetition so that the user can see the effect. i hope this makes sense.

i have had a brief search of the forum and not found this listed else where but i apologise in advance if my search wasn't thorough enough!

thanks very much

sleep(1000); //in milliseconds

hi, this is my first post how to use timer in hard code?tnx in advance..

in delphi 2009

for delphi:

procedure Wait(ms: integer);
var
  bt: DWORD;
begin
  bt := GetTickCount;
  while (GetTickCount - bt) < ms do
    Application.ProcessMessages;
end;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.