Re: Pbclone Library & Lib

 BBS: Inland Empire Archive
Date: 07-01-92 (16:33)             Number: 1872
From: BOB GUINDON                  Refer#: NONE
  To: THOMAS HEAD                   Recvd: NO  
Subj: Re: Pbclone Library & Lib      Conf: (2) Quik_Bas
 -=> Quoting Thomas Head to All <=-

 TH> Well, I saw LibWiz on a bbs, and it looked good.  So I downloaded
 TH> it.  I even downloaded the 500k PBClone libraries.  I found out how to
 TH> run LibWiz, and made a customized library.  One little problem..
 TH>
 TH> I can't figure out a few of the commands, particularly "DISSOLVE"
 TH> and "FADEOUT".  The command is supposed to be:
 TH>
 TH> DISSOLVE BYVAL Attr%
 TH>
 TH> or
 TH>
 TH> FADEOUT BYVAL Attr%
 TH>
 TH> What am I doing wrong?  when I don't assign anything to Attr%, it
 TH> doesn't do anything.  When I do, it locks up.
 TH>
 TH> Any help would be appreciated.
 TH>
 TH> -Tom
 TH>
 TH> -!-
 TH>  ! Origin: PRINT "HAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHHAAHAHAHAHA!!!!!!"
 TH> (1:3632/1.5)

Hi Thomas!

I've tried the PBClone library and found that it is quite useful, once you
get used to the way it does things.  Both the Dissolve and FadeOut routines
clear the screen in an interesting way.  When you call either of these
routines, you must specify the attribute that you want the screen cleared
to.  For this example, I am using the attribute 7, which is light gray on
black (normal text or COLOR 7, 0).  To determine the attribute, you can
call the PBClone Function "CalcAttr2%(Foreground%, Background%)" or the
PBClone Function "CalcAttr, Foreground%, Background%, Attr%".

For the function you would use something like this:
     Attr% = CalcAttr2%(7, 0)     ' this would return the value 7 (COLOR 7, 0)
     FadeOut Attr%
For the subroutine you would use something like this:
     CalcAttr, 7, 0, Attr%        ' this would return the value 7 (COLOR 7, 0)
     Dissolve Attr%
For the example below, I simply plug the value 7 directly into the routines.

Start of Example -------------------------------------------
------------------

' Program to demonstrate the PBClone Dissolve and FadeOut routines.
' Be sure to load QuickBASIC with the proper customized PBClone
' library and either declare the needed routines directly (as shown
' below) or include the ".BI" file.

DECLARE SUB Dissolve (BYVAL Attr%)
DECLARE SUB FadeOut (BYVAL Attr%)

COLOR 7, 0           ' Set the initial screen color to light gray on black
CLS                  ' Clear the screen

FOR X = 1 TO 24                     ' Fill the screen with characters
   PRINT STRING$(80, X + 64);       ' to make the Dissolve and FadeOut
NEXT X                              ' routines readily apparent

LOCATE 25, 21: PRINT "Press 'D' to Dissolve or 'F' to FadeOut";

DO
   KeyIn% = CVI(INKEY$ + STRING$(2, 0))      ' Get keystroke, if any

   SELECT CASE KeyIn%
      CASE 68, 100           ' User pressed "D" or "d"
         Dissolve 7          ' Call PBClone routine - Dissolve
         EXIT DO             ' Break out of the loop
      CASE 70, 102           ' User pressed "F" or "f"
         FadeOut 7           ' Call PBClone routine - FadeOut
         EXIT DO             ' Break out of loop
      CASE IS > 0            ' User pressed an invalid key
         SOUND 100, 1        ' Alert user to invalid keystroke
   END SELECT
LOOP

END                          ' End the program and return control to
                             ' DOS or the QuickBASIC environment.

End of Example ---------------------------------------------------------------

I hope that this example helps.  Let me know if you have any more trouble.
Keep in mind that while I tested this code, I ended up typing it into this
message using a text editor.  I hope I didn't make any typos.

-Bob-


... "What?!? This isn't the Files section?!?"
--- GEcho 1.00/beta
 * Origin: JMC Telecom BBS <West Warwick, RI 401-826-3789> (1:323/113)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET