home *** CD-ROM | disk | FTP | other *** search
- Unit SetWind; {
- ------------ }
- {$N+,E+}
-
- Interface {
- --------- }
- Uses CRT;
-
- Procedure SetWindow(X1,Y1,X2,Y2 : Integer);
-
- Implementation {
- -------------- }
-
- Procedure SetWindow(X1,Y1,X2,Y2 : Integer);
-
- { This procedure establishes a window for various menues }
-
- Const
-
- UpLeftCorner = #201;
- HorzBar = #205;
- UpRightCorner = #187;
- VertBar = #186;
- LowLeftCorner = #200;
- LowRightCorner = #188;
-
- Var
- I : Integer;
-
-
- Begin
- Window(X1-1,Y1-1,X2+1,Y2+1);
- ClrScr;
- Window(1,1,80,25);
- GoToXY(X1-1,Y1-1);
- Write(UpLeftCorner);
-
- For I := X1 to X2 Do
- Write(Horzbar);
- Write(UpRightCorner);
- For I := Y1 to Y2 Do
- Begin
- GoToXY(X1-1,I); Write(VertBar);
- GoToXY(X2+1,I); Write(VertBar)
- End;
- GoToXY(X1-1,Y2+1);
- Write(LowLeftCorner);
- For I := X1 to X2 Do
- Write(HorzBar);
- Write(LowRightCorner);
- Window(X1,Y1,X2,Y2)
- End; {of Proc SetWindow }
-
- End. {of Unit SetWind}