BCX Console Demonstration Program s119.bas

 DrawBox(20, 5, 60, 20, 3, 4, 11, 9, 3, "BCX  ROCKS!")
 
 WHILE NOT INSTAT
   LOCATE 12, 34, 0
   COLOR 4, 9
   PRINT "BCX  ROCKS!";
   SLEEP(200)
   LOCATE 12, 34, 0
   COLOR 15, 9
   PRINT "BCX  ROCKS!";
   SLEEP(200)
 WEND
 COLOR 7,0 : CLS
 
 SUB DrawBox(X1, Y1, X2, Y2, Bdrfg ,Bdrbg, Winfg, Winbg, Style, Title$)
   LOCAL Tb, Sid, Tlc, Trc, Blc, Brc, Tmp, Temp$
 
   SELECT CASE Style
     '----------------------------------------------------------------- 
   CASE 1          'Single Sides,Top And Bottom 
     '----------------------------------------------------------------- 
     Tb=196  :  Sid=179  :  Tlc=218  :  Trc=191  :  Blc=192  :  Brc=217
     '----------------------------------------------------------------- 
   CASE 2          'Double Sides,Top And Bottom 
     '----------------------------------------------------------------- 
     Tb=205  :  Sid=186  :  Tlc=201  :  Trc=187  :  Blc=200  :  Brc=188
     '----------------------------------------------------------------- 
   CASE 3          'Single Sides,Double Top And Bottom 
     '----------------------------------------------------------------- 
     Tb=205  :  Sid=179  :  Tlc=213  :  Trc=184  :  Blc=212  :  Brc=190
     '----------------------------------------------------------------- 
   END SELECT
 
   Temp$ = CHR$(Tlc) & STRING$(X2 - X1 - 2, Tb) & CHR$(Trc)
   LOCATE Y1, X1, 0 : COLOR Bdrfg, Bdrbg : PRINT Temp$;
   LOCATE Y1, ((X1 + X2) / 2) - (LEN(Title$) / 2), 0 : PRINT Title$;
 
   FOR Tmp = Y1 + 1 TO Y2 - 1
     COLOR Bdrfg, Bdrbg
     LOCATE Tmp, X1, 0  : PRINT CHR$(Sid);
     COLOR Winfg, Winbg : PRINT SPACE$(X2 - X1 - 2);
     COLOR Bdrfg, Bdrbg : PRINT CHR$(Sid);
   NEXT
 
   Temp$ = CHR$(Blc) & STRING$(X2 - X1 - 2, Tb) & CHR$(Brc)
   LOCATE Y2, X1, 0 : PRINT Temp$;
 END SUB