home *** CD-ROM | disk | FTP | other *** search
- VB BOOK Version 1.2
-
- Utility to print ASCII text files to LaserJet Series II, IIp, or III
- printers in booklet format (4 pages to a sheet).
-
- Based on the program, PC BOOK, by Jay Munro, Copyright 1990 PC Magazine -
- Ziff Davis - Jay Munro.
-
- Originally written by Jay Munro in Quick Basic 4.5 and converted to Visual
- Basic by Dennis Scott on September 1, 1991. Updated to version 1.2
- March, 1993.
-
- USE AND DISTRIBUTION:
-
- VB Book Version 1.2 can be freely used and distributed by any person or
- company but it's not to be sold. Distributors and BBS operators are
- permitted to charge distribution fees as they see fit.
-
- PURPOSE:
-
- VB BOOK prints README and similar ASCII files in booklet format on an HP
- LaserJet II, IIp, or III printer. Uses two-sided printing in landscape mode,
- with Line Printer font so that four standard pages of up to 80 characters
- per line, 66 lines per page are printed on each sheet without formatting
- changes.
-
- REMARKS:
-
- The filename can designate any ASCII text file in which each line is
- terminated with a Carriage Return/Line Feed combination. Page Feed characters
- can be added to force breaks in addition to those implicit in the 60-line
- (68-line if a header is used) page length.
-
- The original switches in PC Book have been replaced with Windows Checkboxes.
- Any or all of the Checkboxes can be used to create a one-line header that
- prints the filename, page number, and date, on all but blank pages. The Wrap
- Checkbox causes lines exceeding the configurable line length to wrap; by
- default such lines are wrapped. Configurable line length was added in version
- 1.1 (see "Updates" below) so that space could be left on the left side for
- hole punching.
-
- Output can be directed to LPT1, LPT2, COM1, COM2, or File. Noted that
- you must set the proper parameters for your port before printing to a COM
- port. If File is selected, you will be prompted to enter an output filename.
-
- VB BOOK sequences the page printing so that all side-one pages are printed in
- one pass. The sheets are then put back in the LaserJet paper tray and all
- side-two pages are printed. The finished booklet can then be created with a
- single fold. When using the normal (top) LaserJet output bin the pass-one
- sheets should be reinserted in the paper tray without any relative change
- in orientation. If rear output from the printer is used, the sheets must be
- turned over as a group before reinsertion. If you wish to hole punch the
- finished product, set the line length to something less that 80. Line
- lengths of 75 to 76 seem to work real well for hole punching.
-
- REQUIREMENTS:
-
- VB Book requires Windows 3.x. The Visual Basic Run Time file, VBRUN100.DLL,
- must be in the path (recommend putting it in your Windows directory).
- Modifications will require Microsoft Visual Basic Version 1.0 or greater.
- Both the executable and the source files for VB Book are provided.
-
- COMMENTS TO QuickBASIC PROGRAMMERS:
-
- The conversion of PC Book from QuickBASIC to Visual Basic (VB) was undertaken
- as an exercise in converting original QuickBASIC (QB) source code into VB code.
- It was surprisingly easy!
-
- The hardest part was deciding HOW the screens (forms in VB) should look.
- Actually designing the forms is very easy. Once the forms were designed, I
- just used "load text" to get the original QB code into the main form. VB does
- almost everything automatically. For example, all SUBs are automatically
- created and the old code placed in them.
-
- Some things will need to be changed, of course. Any input from the user
- (QBs Input, Line Input, and Inkey commands) needs to converted to "InputBox$"
- functions. Similarly, the "print" statements (with corresponding Locate's)
- were converted to "MsgBox" functions or a form created to place them onto.
- The QB code that performed initialization was placed in the main form's
- Form_Load procedure. All Declare's were removed. Most of the above changes
- were accomplished by pressing F5 (run) and letting VB tell me what it didn't
- like. I just used the ol' cut & paste to put things in the right place.
-
- I then defined what should happen when each of the controls on the forms were
- activated (usually clicked) and wrote the code into those areas. Putting the
- drive, directory, and file selection boxes on the screen and activating them
- is phenomenally easy!
-
- The overall concepts of VB are a little difficult to comprehend at first but
- then it clicks and it all becomes quite simple. I would highly recommend that
- you take the tutorial before doing anything. If you don't, you will not
- comprehend what's going on and will probably get disgusted and quit.
-
- This conversion took about a day to do because of having to learn VB. If I
- had to do it again I could probably complete it in an hour or less. Please
- note that the code has not been "cleaned up" - some debugging code may still
- be there.
-
- RECOMMENDED ADDITIONS:
-
- Want some practice with VB? Why not add: A screen preview of output while
- printing (or before printing or instead of printing) and status display of
- percent completed.
-
- If anyone adds this capability or changes the code in some other way, please
- be kind enough to send me a copy.
-
- Please send comments or suggestions to:
-
- Dennis Scott
- CompuDirect
- 7711 Butler Road
- Myrtle Beach, SC 29575-6628
- (803)650-7460
- CompuServe ID: 71360,3701
-
- DISCLAIMER:
-
- The standard disclaimer applies: Use this program at you own risk. I will
- not be held responsible for anything!
-
- UPDATES:
-
- Version 1.1, December 18, 1991. Added the following features:
-
- 1. Status display to give an indication that the program is really printing.
- It is also used to display totals, source file, and destination.
-
- 2. Added the capability to set the line length which in effect allows the
- margins to be set. This feature was added so that people could use a
- hole punch if needed (added at the request of Norman Levenstein;
- 70366,140). With this set to other than the default, recommend that
- you edit your text file so that its line length is equal to or less than
- this setting. Otherwise, the lines will wrap at the right edge (or be
- cut off if line wrap is turned off).
-
- 3. Added the ability to cancel before starting to print side 2, i.e., if the
- first side is not what you really wanted then why print the second side.
-
- 4. Cleaned up the code somewhat. It's still not real pretty but this a free
- program!
-
- Version 1.2, March 9, 1993.
-
- 1. Changed info screens to reflect our change of address and telephone
- number.
-
- 2. Clean up the code a little more. Still not great but better.
-
- 3. Added a new file called SOURCE.DOC to the distribution archive. It
- is the source code listing from version 1.0 and is included so that
- people without Visual Basic can see the source code and thus make a
- determination of whether to start using VB or not. This file is not
- needed to use nor change VB BOOK.
-
-