[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   Function:   PackScr()

               PackScr() will pack a string returned by SaveScreen(),
               The packing method is quite efficient (more later) and then
               can be vary handy when quite some screens are saved in a
               sort of windowed environment in your application.
               With VMM, it's not the absence of memory that will neck your
               application, but using less memory may make less Disk/EMS
               swapping necessary, and thus making the application a bit
               more efficient.

               The strings returned by SaveScreen() store characters,
               followed by an attribute byte for the portion of the screen
               saved. Making such assumptions about the data to pack make
               it possible to implement very efficient packing methods:
               PackScr() first considers only the characters to pack, and
               then the attributes. The packing method is then RLE.

               When, for instance, the color of the whole screen is the
               same, SaveScreen() uses 2000 bytes to store the attributes,
               with PackScr(), that is 4 bytes. Typically, PackScr() requires
               15% - 35% of the original SaveScreen() size, depending on the
               screen saved.

   Syntax:     PackScr(cSavedScr) --> cPackedStr

   Arguments:  <cSavedScr> is the variable returned by SaveScreen().

   Returns:    a Packed string, Use UnPackScr() and RestScreen() to
               restore that region of the screen.

   Usage:      Scr := PackScr(SaveScreen(0,0,MaxRow(),MaxCol()))
               PopUp(SomeThing)
               RestScreen(0,0,MaxRow(),MaxCol(),UnPackScr(Scr))

See Also: UnPackScr()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson