Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : GRUMP131.ZIP
Filename : DEMO.PRG
*³ DEMO.prg ³
*³ Grumpfish Library demo ³
*³ Greg Lief ³
*³ 10/16/88 ³
*ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
EXTERNAL HELP,POPCALC,POPPHONE,POPDATE,POPMM,POPPUZ,POPSTOP
stopkey = -4 && F5 = hot key for stopwatch
calckey = -5 && F6 = hot key for calculator
phonekey = -6 && F7 = hot key for phone directory
datekey = -7 && F8 = hot key for calendar
mmkey = -8 && F9 = hot key for Mastermind
puzkey = -9 && F10= hot key for puzzle
SET KEY stopkey TO POPSTOP
SET KEY calckey TO POPCALC
SET KEY phonekey TO POPPHONE
SET KEY datekey TO POPDATE
SET KEY mmkey TO POPMM
SET KEY puzkey TO POPPUZ
selected = 'i'
maincolor = IF(Iscolor(), '+w/b', 'i')
SET CURSOR off
SET WRAP on
SET SCOREBOARD off
SET COLOR TO &maincolor
CLEAR
SET COLOR TO W/R
FOR X = 3 TO 1 step -1
@ 10+X, 23-X, 13+X, 56-X BOX Replicate(Chr(179-X), 9)
NEXT
Exbox(10,23,13,56,5,1)
SET COLOR TO +W/R
Spread('Good '+Timeword()+', and welcome to',11)
Spread('the'+Space(19)+'demo!!',12)
SET COLOR TO +W*/R
@12,30 SAY 'GRUMPFISH LIBRARY'
DO CHARGE
Inkey(4)
SET COLOR TO +W/R
CLEAR
IF ! Iscolor()
Popbox(8,13,15,66,1,15)
Spread('You should run this demo on a color monitor to get',11,10)
Spread('the full effect of the exploding & shrinking boxes',12,10)
Inkey(4)
Scroll(8,13,15,66,0)
else
SET COLOR TO +W/RB
Exbox(9,17,11,62,3,3)
@10,19 SAY "Let's start out with some exploding boxes"
Inkey(3)
Shrbox(9,17,11,62,1,maincolor)
SET COLOR TO +W/GR
Exbox(15,19,18,60,1,3)
@16,23 SAY 'You can already see that exploding'
@17,23 SAY 'boxes add snap to Clipper programs'
Inkey(4)
@16,21 SAY ' But the punch line is when you shrink'
@17,21 SAY ' the box back into the magnetic void!'
Inkey(4)
Shrbox(15,19,18,60,3,maincolor)
endif
SET COLOR TO +W/G
Dropbox(5,19,13,60,1,20)
Spread('Howzabout a Lotus-like light-bar menu',8,10)
Spread('generated with just one line of code?',9,10)
SET COLOR TO W/b
Spread('(Lotus is a registered trademark of Lotus Development Corp.)',24,11)
Inkey(4)
SET COLOR TO +W/G
Exbox(15,18,18,61,2,2)
Spread('(Well, two lines actually, since we want',16)
Spread('messages to appear for each menu option)',17)
Inkey(4)
SET COLOR TO &maincolor
@ 5,0 CLEAR
SET MESSAGE TO 14 Center
mes_str='Enter Data (of course)$Get Hard Copies$Reindex Files$Adios, Clipper$'
sel = Menuh(12,18,4,'Data Entry$Reports$Maintenance$Exit$',mes_str,'+w/b,&selected')
Tty(17,'Press any key to continue with this demo',100)
@ 10,0 CLEAR
SET COLOR TO +W/BG
Popbox(11,13,14,66,4,13)
Spread('In case you were wondering, Grumpfish Library does',12,20)
Spread('include a function to spread strings out like this',13,20)
Inkey(4)
Shrbox(11,13,14,66,2,maincolor)
SET COLOR TO +W/BG
Exbox(11,16,13,61,4,3)
Spread("Now let's create a vertical bounce-bar menu",12)
Inkey(4)
Shrbox(11,16,13,61,2,maincolor)
SET MESSAGE TO 24 Center
DECLARE mainmenu[4]
mainmenu[1]='User-Defined Filter$Roll your own query'
mainmenu[2]='Batch Replacement$Goodbye, dBASE dot prompt!'
mainmenu[3]='The Secret of Life$Take this with a grain of salt'
mainmenu[4]='Quit$Exit to DOS'
mainloop = .T.
sel=Menuv(mainmenu,'Grumpfish Demo Menu',8,'+w/rb,&selected','+gr/n')
SET COLOR TO &maincolor
@ 6,0 CLEAR
SET COLOR TO +W/R
Exbox(12,14,15,65,1,3)
Spread("See? It's easy to paint colorful vertical menus.",13)
Inkey(3)
Spread("You can even add drop shadows to simulate depth.",14)
Inkey(3)
Shrbox(12,14,15,65,2,maincolor)
SET COLOR TO +W/GR
Exbox(11,12,17,68,1,3)
Tone(440,1)
Tone(440,1)
@12,14 SAY "But you haven't even seen the pop-up utilities yet!!"
Inkey(3)
Spread("Let's return to the vertical menu, but this time play",13,5,41)
Spread("around with the pop-ups. Start off with F1 for Help.",14,5,41)
Inkey(5)
@15,14 SAY "However, don't overlook the menu options! Create your"
@16,14 SAY "own query, or try a batch replacement, or..."
Inkey(5)
Shrbox(11,12,17,68,2,maincolor)
DO WHILE mainloop
sel=Menuv(mainmenu,'Grumpfish Demo Menu',11,'+w/rb,&selected','+gr/n')
DO CASE
CASE sel = 1
IF ! FILE('phone.dbf') .OR. ! FILE('phone.ntx')
Err_msg('You need the sample phone database & index files for this option')
loop
endif
USE phone INDEX phone
IF Setfilt()
SET COLOR TO &maincolor
Browse()
endif
SET COLOR TO &maincolor
CLOSE data
CASE sel = 2
IF ! FILE('phone.dbf')
Err_msg('You need the sample phone database file for this option')
loop
endif
USE phone
Batchrep()
CLOSE data
CASE sel = 3
Center (23,"Hint: the password rhymes with 'Frumpwish'")
IF Pass_chk('GRUMPFISH')
SET COLOR TO +W/R
Exbox(17,24,21,55,1,3)
@18,27 SAY 'Introducing the Singing PC!'
@19,27 SAY 'Try this option again to '
@20,27 SAY 'get one of four funny tunes'
X = Rand(4)
DO CASE
CASE X = 0
DO JEOPARDY
CASE X = 1
DO BEATIT
CASE X = 2
DO HATDANCE
CASE X = 3
DO IPANEMA
endcase
Shrbox(17,24,21,55,1,maincolor)
endif
@23,0 CLEAR
otherwise
mainloop = .F.
endcase
enddo
SET COLOR TO +W/N
Dropbox(4,9,20,70,5,3)
msg = "Thanks for trying the Grumpfish Library! Give it a thorough test "
msg = msg + "run in your own Clipper programs. If you decide to make use "
msg = msg + "of its features, you should register your copy to ensure that "
msg = msg + "you are notified of all future updates (because who knows what "
msg = msg + "I might think of next). Registration is a very reasonable $30, "
msg = msg + "and includes a run-time royalty-free license. For $60, you will"
msg = msg + " also receive the source code (100% Clipper Summer '87), which "
msg = msg + "is a great learning tool for beginning and intermediate Clipper "
msg = msg + "programmers. Plus, if anyone registers from one of your copies,"
msg = msg + " you will receive a commission!"+Chr(13)+Chr(10)+Chr(13)+Chr(10)
msg = msg + Space(19)+"Charles G. Lief"+Chr(13)+Chr(10)+Space(19)
msg = msg + "P. O. Box 17761"+Chr(13)+Chr(10)+Space(19)+"Salem, OR 97305"
Memoedit(msg,5,12,19,68,.F.,.F.)
start = Seconds()
DO WHILE Seconds()-start<20 .AND. Inkey() != 27
enddo
CLEAR
SET COLOR TO
SET CURSOR on
RETURN
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/