home *** CD-ROM | disk | FTP | other *** search
- { ╒═════════════════════════════════════════════════════════╕
- │ (c) Jan 1988 Box3.PAS John Tribbett │
- │ │
- │ Procedure produces frame like you see here. │
- │ Export to other programs, or use as an include file. │
- │ The calling sequence is : Box3(boolean,x1,y1,x2,y2); │
- │ Select your own textbackground and textcolor. │
- │ See sample program DRAWBOX.PAS for proper syntax. │
- │ │
- │ If you find BOX FRAMES helpful, send $5.00 to: │
- │ John Tribbett; 778 Mildred Ln SE; Salem, OR 97306 │
- ╘═════════════════════════════════════════════════════════╛
- }
- procedure box3(shadow : boolean; x1,y1,x2,y2 : integer);
- var I : integer;
- begin
- I := 0;
- window(1,1,80,25);
- IF shadow = true
- then
- begin
- window(x1-2,y1+2,x2-2,y2+1);
- textbackground(0);
- clrscr;
- window(1,1,80,25);
- end;
- textbackground(3);
- textcolor(0);
- gotoxy(x1,y1); write('╒'); {top left corner}
- gotoxy(x1+1,y1); {top row}
- for I := x1+1 to x2-1 do
- write('═');
- gotoxy(x2,y1); write('╕'); {top right corner}
- for I := y1+1 to y2-1 do
- begin
- gotoxy(x1,I); write('│'); {left side}
- gotoxy(x2,I); write('│'); {right side}
- end;
- gotoxy(x1,y2); write('╘'); {bottom left corner}
- for I := x1+1 to x2-1 do
- write('═'); {bottom row}
- gotoxy(x2,y2); write('╛'); {bottom right corner}
- window(x1+1,y1+1,x2-1,y2-1);
- end;