home *** CD-ROM | disk | FTP | other *** search
- Procedure DrawBox(StartPosIn, StartPosDown, LengthBox, WidthBox : Integer);
-
- (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
- (* This procedure will draw a box on the screen. It is good for framing *)
- (* menus and such. The input is four numeric values, the first two values *)
- (* are the X, Y coordinates of the screen, the next two values are the *)
- (* length and width of the box. *)
- (* *)
- (* Example DrawBox(10,5,60,15) *)
- (* 10 = X coordinate of the screen. *)
- (* 5 = Y coordinate of the screen. *)
- (* 60 = Length of the box. *)
- (* 15 = Width of the box. *)
- (* *)
- (* Written by *)
- (* Tony Tunison - 75106,2317 *)
- (* Bill Cote - 71256,402 *)
- (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
-
- Const
- DoubleHorizontal = #205;
- SingleHorizontal = #196;
- SingleVertical = #179;
- CornerOne = #213;
- CornerTwo = #184;
- CornerThree = #190;
- CornerFour = #212;
-
- Var
- Count : Integer;
-
- Begin
- GotoXY(StartPosIn, StartPosDown);
-
- For Count := 1 To LengthBox Do
- Write(DoubleHorizontal);
- Write(CornerTwo);
-
- For Count := 1 To WidthBox Do
- Begin
- GotoXY(StartPosIn + LengthBox, StartPosDown + Count);
- Write(SingleVertical)
- End;
-
- GotoXY(StartPosIn, StartPosDown + WidthBox);
- For Count := 1 To LengthBox Do
- Begin
- Write(DoubleHorizontal)
- End;
- Write(CornerThree);
-
- For Count := 1 To WidthBox Do
- Begin
- GotoXY(StartPosIn, StartPosDown + Count);
- Write(SingleVertical)
- End;
-
- GotoXY(StartPosIn, StartPosDown);
- Write(CornerOne);
- For Count := 2 To WidthBox Do
- Begin
- GotoXY(StartPosIn, StartPosDown + Count);
- Write(SingleVertical)
- End;
- GotoXY(StartPosIn, StartPosDown + Count);
- Write(CornerFour)
- End;