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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
{$m 8096,0,0}
uses crt,graph,dos;
var
tabch:array[0..20] of string;
f:text;
s,cpts,posvs,chaine1,chaine2:string;
c:char;
pilote,mode:integer;
x,y,x1,y1,x2,y2,cpt,posv,rang,doserror:integer;
begin
rang:=1;
cpt:=1;
x:=100;
y:=120;
x1:=90;
y1:=105;
x2:=360;
y2:=140;
pilote:=detect;
initgraph(pilote,mode, 'c:\TP\BGI');
assign(f,'c:\TP\menu.txt');
reset(f);
while not eof(f) do
begin
readln(f,s);
chaine1:=copy(s,1,pos(';',s)-1);
tabch[cpt]:=copy(s,pos(';',s)+1,length(s));
outtextxy(x,y,chaine1);
y:=y+40;
cpt:=cpt+1;
end;
close(f);
setcolor(2);
rectangle(x1,y1,x2,y2);
begin
repeat
c:=readkey;
case c of
#80: begin
cpt:=cpt-1;
setcolor(0);
rectangle(x1,y1,x2,y2);
setcolor(2);
rectangle(x1,y1+40,x2,y2+40);
setcolor(0);
rectangle(x1,y1-40,x2,y2-40);
y1:=y1+40;
y2:=y2+40;
end;
#72: begin
cpt:=cpt+1;
setcolor(0);
rectangle(x1,y1,x2,y2);
setcolor(2);
rectangle(x1,y1-40,x2,y2-40);
setcolor(0);
rectangle(x1,y1+40,x2,y2+40);
y1:=y1-40;
y2:=y2-40;
end;
#13: begin
swapvectors;
exec('c:\windows\notepad.exe','');
swapvectors;
end;
end;
until c=#27;
readln;
end;
end. |
Partager