1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
uses dos,graph,crt;
var hour,minute,second,msecond:word;
var GP,GM:integer;
var shour,sminute,ssecond:string[2];
begin
GP:=detect;
initgraph(GP,GM,'c:\tp\BGI');
if GraphResult<>grOk then halt;
while keypressed do readkey;
setcolor(15);
setFillStyle(1,0);
rectangle(100,100,300,150);
while not keypressed do
begin
setcolor(0);
setFillStyle(1,0);
rectangle(101,101,299,149);
setcolor(15);
gettime(hour,minute,second,msecond);
str(hour,shour);
str(minute,sminute);
str(second,ssecond);
SetTextJustify(centerText,centerText);
OuttextXY(200,125,shour+" : "+sminute+" : "+ssecond);
delay(1000);
end;
closegraph;
end. |
Partager