home *** CD-ROM | disk | FTP | other *** search
- DECLARE SUB SetBorder (ColrByte%)
- 'Borders.bas from oct/nov 93 inside microsoft basic
- REM '$INCLUDE: 'qb.bi'
-
- TYPE RegType
- ax AS INTEGER
- bx AS INTEGER
- cx AS INTEGER
- dx AS INTEGER
- bp AS INTEGER
- si AS INTEGER
- di AS INTEGER
- flags AS INTEGER
- END TYPE
-
- DEFINT A-Z
- BeginAgain:
- COLOR 15, 1
- CLS
- COLOR 12, 0
- Text2$ = "Set a BORDER Color by Typing the Color Number"
- LOCATE 2, (80 - LEN(Text2$)) / 2
- PRINT Text2$
-
-
- FOR j = 0 TO 3
- LOCATE 10 + j, 8
- FOR i = 0 TO 15
- COLOR i, 0
- PRINT STRING$(4, 219);
- NEXT
- NEXT
- 'hard to get the numbers to line up because of the space in front
- 'of each number, but got it
- COLOR 15, 1
- LOCATE 10 + j + 1, 7
- FOR n = 0 TO 15
- IF n > 9 THEN
- s = 1
- ELSE
- s = 2
- END IF
- PRINT SPACE$(s); STR$(n);
- NEXT
-
- Again:
- Text$ = "Type the BORDER Color NUMBER & Press {Enter}"
- LOCATE 4, (80 - LEN(Text$)) / 2
- COLOR 15, 1
- PRINT Text$;
- row = CSRLIN
- col = POS(0)
- COLOR 11, 0
- Text2$ = "After Selecting a Color Press <Esc> to end or {Enter} to try again"
- LOCATE 22, (80 - LEN(Text2$)) / 2
- PRINT Text2$;
- LOCATE row + 2, 39
- COLOR 7, 0
- PRINT SPACE$(2)
- LOCATE row + 2, 39, 1, 4, 7
- INPUT "", ColrByte%
- IF ColrByte% > 63 THEN
- GOTO BeginAgain 'I get 63 colors
- END IF
- LOCATE , , 0
- CALL SetBorder(ColrByte%)
- WHILE INKEY$ <> "" 'clears the keyboard
- WEND
- DO
- Kee$ = INKEY$
- LOOP UNTIL LEN(Kee$)
- IF Kee$ = CHR$(27) THEN END
- GOTO Again
- END
-
- SUB SetBorder (ColrByte%) STATIC
- DIM Regs AS RegType
- Regs.ax = &H1001
- Regs.bx = ColrByte% * &H100
- CALL INTERRUPT(&H10, Regs)
- END SUB
-
-