Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DBT10.ZIP
Filename : DBTPAGE.PRG

 
Output of file : DBTPAGE.PRG contained in archive : DBT10.ZIP

*=====================================================================
* DBTPAGE - activate screen page demo
* (c) 1989 BERNATH COMPUTER
* 22:01:23 9/21/1989
*=====================================================================
CALL DBTOOLS WITH "15,3" && store existing screen
CALL DBTOOLS WITH "7,0,15,2,0" && dithered background
CALL DBTOOLS WITH "3,1,5,9,50,14,1,1,0,1" && draw box
CALL DBTOOLS WITH "1,2,12,14,1,0,P A G E - function 22" && title in box
SET COLOR TO W/B && display box text
@ 3,8 SAY "PAGE allows you to set the active"
@ 4,8 SAY "screen page. In conjunction with the"
@ 5,8 say "ATSAY, BOX, and DITHER functions, you"
@ 6,8 SAY "can draw screens invisibly and then"
@ 7,8 SAY "pop them up instantly."
CALL DBTOOLS WITH "10,8,13,14,1" && pause
CALL DBTOOLS WITH "3,6,7,14,65,15,3,2,0,1" && overlay another box
SET COLOR TO +W/GB && display box text
@ 7,9 SAY "Syntax:"
mPARM="CALL DBTOOLS WITH "+CHR(34)+"22,pagenum"+CHR(34)
@ 8,9 SAY mPARM
SET COLOR TO B/GB
@ 10,11 SAY "In a color adapter there are four sections of video"
@ 11,11 SAY "memory numbered 0-3. These can be treated as separate"
@ 12,11 SAY CHR(34)+"windows"+CHR(34)+" to draw text to."
CALL DBTOOLS WITH "10,13,30,15,3"

CALL DBTOOLS WITH "7,2,12,4,0"
CALL DBTOOLS WITH "3,7,20,16,60,14,1,2,0,1"
CALL DBTOOLS WITH "1,8,30,9,1,0,This is video page 0"
SET COLOR TO +W/B
@ 10,23 SAY "This is the standard video page. By"
@ 11,23 SAY "the time you have finished reading"
@ 12,23 SAY "this I'll have already drawn three"
@ 13,23 SAY "other screens on other video pages,"
@ 14,23 SAY "invisibly."
CALL DBTOOLS WITH "10,15,23,14,1"

IF .NOT. ISCOLOR()
DO ERRMSG WITH "Sorry, PAGE only works with a color adapter."
ELSE
CALL DBTOOLS WITH "4,0,0"
CALL DBTOOLS WITH "7,2,10,2,1"
CALL DBTOOLS WITH "3,7,20,16,60,15,5,2,1,1"
CALL DBTOOLS WITH "1,8,30,15,5,1,This is video page 1"
CALL DBTOOLS WITH "1,9,30,15,5,1,This is video page 1"
CALL DBTOOLS WITH "1,10,30,15,5,1,This is video page 1"
CALL DBTOOLS WITH "1,11,30,15,5,1,This is video page 1"
CALL DBTOOLS WITH "1,12,30,15,5,1,This is video page 1"
CALL DBTOOLS WITH "1,13,30,15,5,1,This is video page 1"
CALL DBTOOLS WITH "1,14,30,15,5,1,This is video page 1"
CALL DBTOOLS WITH "1,15,30,15,5,1,This is video page 1"

CALL DBTOOLS WITH "7,1,8,7,2"
CALL DBTOOLS WITH "3,7,20,16,60,0,7,2,2,1"
CALL DBTOOLS WITH "1,8,30,0,7,2,This is video page 2"
CALL DBTOOLS WITH "1,9,30,0,7,2,This is video page 2"
CALL DBTOOLS WITH "1,10,30,0,7,2,This is video page 2"
CALL DBTOOLS WITH "1,11,30,0,7,2,This is video page 2"
CALL DBTOOLS WITH "1,12,30,0,7,2,This is video page 2"
CALL DBTOOLS WITH "1,13,30,0,7,2,This is video page 2"
CALL DBTOOLS WITH "1,14,30,0,7,2,This is video page 2"
CALL DBTOOLS WITH "1,15,30,0,7,2,This is video page 2"

CALL DBTOOLS WITH "7,3,4,1,3"
CALL DBTOOLS WITH "3,7,20,16,60,11,3,2,3,1"
CALL DBTOOLS WITH "1,8,30,11,3,3,This is video page 3"
CALL DBTOOLS WITH "1,9,30,11,3,3,This is video page 3"
CALL DBTOOLS WITH "1,10,30,11,3,3,This is video page 3"
CALL DBTOOLS WITH "1,11,30,11,3,3,This is video page 3"
CALL DBTOOLS WITH "1,12,30,11,3,3,This is video page 3"
CALL DBTOOLS WITH "1,13,30,11,3,3,This is video page 3"
CALL DBTOOLS WITH "1,14,30,11,3,3,This is video page 3"
CALL DBTOOLS WITH "1,15,30,11,3,3,This is video page 3"

KOUNT = 1
DO WHILE KOUNT < 4
mPARM = "22,"+STR(KOUNT,1)
CALL DBTOOLS WITH mPARM
CALL DBTOOLS WITH "6,48"
KOUNT = KOUNT + 1
ENDDO

LOOPIT = 1
DO WHILE LOOPIT < 16
KOUNT = 0
DO WHILE KOUNT < 4
mPARM = "22,"+STR(KOUNT,1)
CALL DBTOOLS WITH mPARM
KOUNT = KOUNT + 1
CALL DBTOOLS WITH "6,2"
ENDDO
LOOPIT = LOOPIT + 1

ENDDO
CALL DBTOOLS WITH "22,0"
CALL DBTOOLS WITH "4,1,0"
ENDIF
CALL DBTOOLS WITH "14,3,0"
RETURN