home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 18
/
CD_ASCQ_18_111294_W.iso
/
dos
/
prg
/
pas
/
pscrn55
/
basic.exe
/
DEMO.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-10-09
|
3KB
|
75 lines
DEFINT A-Z
'$INCLUDE: 'PScreen.Inc' '... Declare functions in PScreen.Obj
' For Microsoft Basics only.
' Requires: P-Screen.Obj
' LoadScr?.Obj
'===================================================
' POWERBASIC USERS: 'un-REM the next few lines
'===================================================
''$INCLUDE "PScreen.Inc" '...declare routines
''$Link "PScreen.Obj" '...essential "screen restore" routines
''$Link "LoadScrn.PBU" '...link our "load screen" routines
''
'===================================================
' END: POWERBASIC USERS
'===================================================
'============================================================== Demo.Bas
'
' Purpose: A universal but simple "presentation" program.
'
' Turns ANY P-Screen screen library into a mini presentation!
'
' Copyright: 1994, Rob W. Smetana A P-Screen support module.
'
' Syntax: Demo LibraryName <cr>
'
' Where: "LibraryName" is the name of a P-Screen screen
' library -- WITH path and extension!
'
' Example: demo c:\p-screen\lessons.psl <cr>
'
' Improvements: - Add option to let users back up as well as move
' forward through screens.
' - Improve error trapping; add more messages to
' better explain what happened.
'============================================================== Demo.Bas
COLOR 7, 1: CLS
Call psInitialize:Cls '...for SHAREWARE versions ONLY
LibName$ = COMMAND$ '...use which library?
IF LEN(LibName$) THEN '...did they pass anything?
NumScrns = NumScreensInLib(LibName$) '...how many screens?
END IF
IF NumScrns < 1 THEN '...-999 means "library not found"
PRINT "P-Screen screen library ["; LibName$; "] wasn't found, or it was invalid."
PRINT "Sorry. Ending."
PRINT
PRINT "Syntax: demo drive:\directory\LibraryName <cr>."
END
END IF
FOR Scrn = 1 TO NumScrns '...display each screen and pause
ErrCode = DisplayScreen(LibName$, "", Scrn)
IF ErrCode < -1 THEN '...exit with error message
CLS : PRINT "Sorry, an error occurred. Ending.": END
ELSE
'...pause for them to press a key
DO: Ky$ = INKEY$: LOOP UNTIL Ky$ > ""
'...exit if they press Escape
IF Ky$ = CHR$(27) THEN CLS : END
END IF
NEXT
CLS : PRINT "that's all . . ."