'=========================================================================== ' Subject: VIEW PRINT COMMAND Date: Unknown Date (00:00) ' Author: Jeff Shantz Code: QB, QBasic, PDS ' Keys: VIEW,PRINT,COMMAND Packet: TEXT.ABC '=========================================================================== 'View Print Command Example By Jeff Shantz ' 'Programmer's Note ' 'This Utility Was Programmed In About 2 Minutes. I Just Sat Down And Thought 'That It Would Be Nice To Make A Program That Shows User's Some Of The 'Commands In QuickBasic That Aren't Used Everyday. This Program Uses '1 Main Command, View Print. Many Programmers In QuickBasic Who Are 'Moderately Good Actually Do Not Know This Command. It Is Quite Useful As 'View Print Can Be Used To Make Programs With Windows In Certain Parts Of 'The Screen Without Affecting Any Other Parts Of The Screen. ' 0 CLS : SCREEN 0: LOCATE 1, 1: X$ = STRING$(79, 196): 'sets the border to X$ PRINT X$: 'prints the upper border LOCATE 11, 1: PRINT X$ 'prints the lower border 'Titles And Instructions LOCATE 1, 19: PRINT "The View Print Command Example - Fake DOS" LOCATE 15, 5: PRINT "To Clear, Type CLS": LOCATE 15, 45: PRINT "To Type A File, Enter TYPE" LOCATE 16, 5: PRINT "To List Directory, Type DIR" LOCATE 16, 45: PRINT "To Quit, Type QUIT" VIEW PRINT 2 TO 10 'sets the window to lines 2 and 10 only CLS 1 INPUT "> ", A$ 'simulated `command prompt' IF A$ = "CLS" THEN CLS : GOTO 1 IF A$ = "cls" THEN CLS : GOTO 1 IF A$ = "TYPE" THEN 2 IF A$ = "type" THEN 2 IF A$ = "DIR" THEN 4 IF A$ = "dir" THEN 4 IF A$ = "QUIT" THEN SYSTEM IF A$ = "quit" THEN SYSTEM ELSE PRINT : PRINT ">> "; A$; " : Command Not Found": PRINT : GOTO 1 2 INPUT "Which File? ", B$ IF B$ = "READ.ME" THEN 3 IF B$ = "read.me" THEN 3 ELSE PRINT ">> File Not Found": GOTO 1 3 CLS PRINT "File: READ.ME": PRINT 'fake text file PRINT X$ PRINT "This is a fake text file in a fake dos example written by Jeff Shantz." PRINT "If you would like more examples by Jeff Shantz or to check out his" PRINT "Press Any Key To Continue...": SLEEP PRINT "public domain catalogue, check the end of the source code for details" PRINT : PRINT "": PRINT PRINT "Press Any Key To Continue...": SLEEP: CLS : GOTO 1 4 PRINT : PRINT "Directory Of C:\" PRINT PRINT "READ .ME, 648 bytes, August 18th 1995, 4:35:51 am" PRINT : PRINT "1 file(s) 648 bytes" PRINT " 0 bytes free" PRINT : GOTO 1 'Written by Jeff Shantz ' 'A catalogue of other public domain programming examples and other types of 'public domain software written by Jeff Shantz can be obtained by sending '$2.00 (for shipping & handling) to: ' 'Programming Examples 'c/o Jeff Shantz '162 Ann Street 'Kitchener,Ontario 'N2B 1Y3, CANADA ' 'or by setting your modem to 8,N,1 and calling The Crypt at 1-(519)-576-3127