Q: How to make the program delay
A:
procedure Delay (msecs: integer); varFirstTickCount: longint; beginFirstTickCount: = GetTickCount; repeatApplication.ProcessMessages; until ((GetTickCount-FirstTickCount)> = Longint (msecs)); end;