Текст модуля win

unit win;

interface

uses crt;

Procedure wind (x,y,x1,y1,c1,c2,c3,c4:byte;str:string);

{c1 - рамка,c2 - фон,c3 - текст,c4 - заголовок}

implementation

Procedure wind;

var

len,len1:word;

i,e:integer;

begin

len:=length(str);

textcolor (c1);

textbackground (c2);

GotoXY (x,y); Write ('+');

for i:=x+1 to x1-1 do write ('-');

GotoXY (x,y1); Write ('+');

for i:=x+1 to x1-1 do write ('-');

GotoXY (x1,y); Write ('+');

GotoXY (x1,y1);Write ('+');

for i:=y+1 to y1-1 do

begin

GotoXY(x,i);

Write('¦');

GotoXY(x1,i);

Write('¦');

end;

for i:=y+1 to y1-1 do

for e:=x+1 to x1-1 do

begin

GotoXY (e,i);

Write (' ');

end;

normvideo;

textbackground(c2);

textcolor(c4);

len:=len div 2;

len1:=(x1-x) div 2;

gotoxy(x+len1-len,y);

write(str);

TextColor(c3);

for i:=x+1 to x1+1 do begin GotoXY(i,y1+1); Write ('_'); end;

for i:=y+1 to y1+1 do begin GotoXY(x1+1,i); Write ('_'); end;

window(x+1,y+1,x1-1,y1-1);

end;

end.

Назад Главное меню Вперед