# Window Drawing (3/4)

``` BBS: Inland Empire Archive
Date: 10-16-93 (12:58)             Number: 5
From: EDWARD SCHLUNDER             Refer#: NONE
To: ALL                           Recvd: NO
Subj: Window Drawing (3/4)           Conf: (2) Quik_Bas```
```'>>> Page 3 of WINDOW.BAS begins here.
WindowCol1(WindowNum) = Col1
WindowRow2(WindowNum) = Row2
WindowCol2(WindowNum) = Col2 + 5
WindowFore(WindowNum) = Fore
WindowBack(WindowNum) = Back
SELECT CASE ATTR AND 192

CASE 0      'Single Line Border
COLR\$ = CHR\$((Fore * 8 AND 128) + (Back * 16) + (Fore AND 15))
BORDER\$ = "Ö" + COLR\$ + "á" + COLR\$ + "¢" + COLR\$ + "°" + COLR\$ + " " +_
COLR\$
BORDER\$ = BORDER\$ + "°" + COLR\$ + "â" + COLR\$ + "á" + COLR\$ + "ì" + COLR\$

CASE 64
COLR\$ = CHR\$((Fore * 8 AND 128) + (Back * 16) + (Fore AND 15))
BORDER\$ = "í" + COLR\$ + "ë" + COLR\$ + "¡" + COLR\$ + "°" + COLR\$ + " " +_
COLR\$
BORDER\$ = BORDER\$ + "°" + COLR\$ + "å" + COLR\$ + "ë" + COLR\$ + "ƒ" + COLR\$

CASE 128     '3-D Window!
BWHITE\$ = CHR\$(15 + Back * 16): BWG\$ = CHR\$(8 + Back * 16)
BORDER\$ = "Ü" + BWHITE\$ + "Ô" + BWHITE\$ + "Éx" + "Ü" + BWHITE\$ + " " +_
CHR\$(Back * 16)
BORDER\$ = BORDER\$ + "Ü" + BWG\$ + "Ô" + CHR\$(127) + "É" + BWG\$ + "Ü" + BWG\$

CASE 192    'Double line boder
COLR\$ = CHR\$((Fore * 8 AND 128) + (Back * 16) + (Fore AND 15))
BORDER\$ = "è" + COLR\$ + "ë" + COLR\$ + "£" + COLR\$ + "¤" + COLR\$ + " " +_
COLR\$
BORDER\$ = BORDER\$ + "¤" + COLR\$ + "à" + COLR\$ + "ë" + COLR\$ + "¥" + COLR\$
END SELECT

DrawBox Row1, Col1, Row2, Col2, BORDER\$, ATTR
END SUB

SUB PrintWindowTitle (Title\$, Fore, Back, ATTR)

LENTH = WindowCol2(WindowNum) - WindowCol1(WindowNum)
WindowTitle\$(WindowNum) = Title\$
TLEN = LEN(Title\$)
IF ATTR AND 16 THEN
IF ATTR AND 64 THEN
IF WindowAttr(WindowNum) AND 64 THEN LTB\$ = "ç" ELSE LTB\$ = "Ç"
ELSE
RTB\$ = "]"
END IF
END IF
IF ATTR AND 32 THEN
IF ATTR AND 128 THEN
IF WindowAttr(WindowNum) AND 64 THEN RTB\$ = "ó" ELSE RTB\$ = "û"
ELSE
LTB\$ = "["
END IF
END IF

IF ATTR AND 64 THEN
IF ATTR AND 16 THEN
IF WindowAttr(WindowNum) AND 64 THEN RTB\$ = "ó" ELSE RTB\$ = "û"
ELSE
IF WindowAttr(WindowNum) AND 64 THEN RTB\$ = "ä" ELSE RTB\$ = "ú"
END IF
END IF

IF ATTR AND 128 THEN
IF ATTR AND 32 THEN
IF WindowAttr(WindowNum) AND 64 THEN LTB\$ = "ç" ELSE LTB\$ = "Ç"
ELSE

IF WindowAttr(WindowNum) AND 64 THEN LTB\$ = "¿" ELSE LTB\$ = "Ñ"
END IF
END IF

FOR J = 4 TO 7
IF ATTR AND 2 ^ J THEN NO = -1
NEXT
IF NO <> -1 THEN LTB\$ = " ": RTB\$ = " "

ROW = WindowRow1(WindowNum)
IF ATTR AND 4 THEN COL = WindowCol1(WindowNum) + (LENTH \ 2 - LEN(Title\$)_
\ 2)
IF ATTR AND 2 THEN COL = WindowCol1(WindowNum) + 2
IF ATTR AND 8 THEN COL = WindowCol2(WindowNum) - LEN(Title\$) - 2

IF TLEN > LENTH THEN EXIT SUB
'>>> Page 3 of WINDOW.BAS ends here. Continued on next page.

... Is this yours?  Your dog left it on my lawn.
___ Blue Wave/QWK v2.12

--- WM v3.01/93-0966
* Origin: 1:114/289 POWER SURGE - Phoenix, Arizona 602/548-
9020  (1:114/289.0)
``` Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET