Do you remember
Delay
procedure from Turbo (Borland)
Pascal? It was used to pause the program “flow” for specific time
interval. In Windows, there is a different style of programming, but
sometimes (maybe) the Dealy procedure may be useful. Here is a simple
implementation of Delay procedure using Delphi.procedure Delay(ms: integer); var now: integer; begin now := GetTickCount + ms; while GetTickCount < now do Application.ProcessMessages; end; procedure TForm1.Button1Click(Sender: TObject); begin Delay(10000); ShowMessage('Finished'); end;
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου