BCX Console Demonstration Program s41.bas

 COLOR 15, 1 : CALL Box(20, 10, 60, 20, 15, 1, "Bcx Sample Window") : COLOR 7, 0
 
 SUB Box(X1, Y1, X2, Y2, Fg, Bg, Title$)
   DIM Tb
   DIM Sid
   DIM Tlc
   DIM Trc
   DIM Blc
   DIM Brc
   DIM Tmp
   DIM A$
   PANEL X1, Y1, X2, Y2, Fg, Bg, 32, 1
   Tb = 205 : Sid = 186 : Tlc = 201 : Trc = 187 : Blc = 200 : Brc = 188
   LOCATE Y1, X1, 0
   A$ = CHR$(Tlc) & REPEAT$(X2 - X1 - 1, CHR$(Tb)) & CHR$(Trc) : PRINT A$;
   A$ = CHR$(Sid)
   FOR Tmp = Y1 + 1 TO Y2 - 1
     LOCATE Tmp, X1, 0 : ? A$; : LOCATE Tmp, X2, 0 : ? A$;
   NEXT Tmp
   LOCATE Y2, X1, 0
   A$ = CHR$(Blc) & REPEAT$(X2 - X1 - 1, CHR$(Tb)) & CHR$(Brc) : PRINT A$;
   LOCATE Y1, X1 + (X2 - X1) / 2 - (LEN(Title$) * .5), 1 : PRINT "[ ",Title$," ]";
   LOCATE Y2 + 1, X1, 0
 END SUB