home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / wp / vbbook13.zip / VBBOOK13.DOC < prev    next >
Text File  |  1993-04-04  |  11KB  |  231 lines

  1.                           VB Book Version 1.3
  2.                               30 March 93
  3.  
  4.  
  5. IMPORTANT:  Don't forget to read UPDATES at the end of this document!
  6.             ---------------------------------------------------------
  7.  
  8. Utility to print ASCII text files to LaserJet Series II, IIp, or III 
  9. printers in booklet format (4 pages to a sheet).
  10.  
  11. Based on the program, PC Book, by Jay Munro, Copyright 1990 PC Magazine - 
  12. Ziff Davis - Jay Munro.
  13.  
  14. Originally written by Jay Munro in Quick Basic 4.5 and converted to Visual 
  15. Basic by Dennis Scott on September 1, 1991.  Updated to version 1.3 
  16. March, 1993.  
  17.  
  18. USE AND DISTRIBUTION:
  19.  
  20. VB Book Version 1.3 can be freely used and distributed by any person or 
  21. company but it's not to be sold.  Distributors and BBS operators are 
  22. permitted to charge distribution fees as they see fit.
  23.  
  24. PURPOSE:  
  25.  
  26. VB Book prints README and similar ASCII files in booklet format on an HP 
  27. LaserJet II, IIp, or III printer.  Uses two-sided printing in landscape mode, 
  28. with Line Printer font (Courier 16.6) so that four standard pages of up to 
  29. 80 characters per line, 66 lines per page are printed on each sheet without 
  30. formatting changes.
  31.  
  32. REMARKS:
  33.  
  34. The filename can designate any ASCII text file in which each line is 
  35. terminated with a Carriage Return/Line Feed combination.  Page Feed characters 
  36. can be added to force breaks in addition to those implicit in the 60-line 
  37. (68-line if a header is used) page length.
  38.  
  39. The original switches in PC Book have been replaced with Windows Checkboxes.
  40. Any or all of the Checkboxes can be used to create a one-line header that 
  41. prints the filename, page number, and date, on all but blank pages.  The Wrap 
  42. Checkbox causes lines exceeding the configurable line length to wrap; by 
  43. default such lines are wrapped.  Configurable line length was added in version
  44. 1.1 (see "Updates" below) so that space could be left on the left side for
  45. hole punching.  A4 (European) paper size was added in version 1.3.
  46.  
  47. Output can be directed to LPT1, LPT2, COM1, COM2, or File.  Note that
  48. you must set the proper parameters for your port before printing to a COM
  49. port.  If File is selected, you will be prompted to enter an output filename
  50. and two PRN files will be created, ready to be copied to the printer.
  51.  
  52. VB Book sequences the page printing so that all side-one pages are printed in 
  53. one pass.  The sheets are then put back in the LaserJet paper tray and all 
  54. side-two pages are printed.  The finished booklet can then be created with a 
  55. single fold.  When using the normal (top) LaserJet output bin the pass-one 
  56. sheets should be reinserted in the paper tray without any relative change
  57. in orientation.  If rear output from the printer is used, the sheets must be
  58. turned over as a group before reinsertion.  If you wish to hole punch the 
  59. finished product, set the line length to something less that 80 (or 90 if
  60. using A4 paper).  Line lengths of 75 to 76 (A2 (American) paper) seem to 
  61. work real well for hole punching.
  62.  
  63. REQUIREMENTS:
  64.  
  65. VB Book requires Windows 3.x.  The Visual Basic Run Time file, VBRUN100.DLL, 
  66. must be in the path (recommend putting it in your Windows directory).  
  67. Modifications will require Microsoft Visual Basic Version 1.0 or greater.  
  68. Both the executable and the source files for VB Book are provided.
  69.  
  70. COMMENTS TO QuickBASIC PROGRAMMERS:
  71.  
  72. The conversion of PC Book from QuickBASIC to Visual Basic (VB) was undertaken 
  73. as an exercise in converting original QuickBASIC (QB) source code into VB code.
  74. It was surprisingly easy!  
  75.  
  76. The hardest part was deciding HOW the screens (forms in VB) should look.  
  77. Actually designing the forms is very easy.  Once the forms were designed, I 
  78. just used "load text" to get the original QB code into the main form.  VB does 
  79. almost everything automatically.  For example, all SUBs are automatically 
  80. created and the old code placed in them.  
  81.  
  82. Some things will need to be changed, of course.  Any input from the user 
  83. (QBs Input, Line Input, and Inkey commands) needs to converted to "InputBox$" 
  84. functions.  Similarly, the "print" statements (with corresponding Locate's) 
  85. were converted to "MsgBox" functions or a form created to place them onto.  
  86. The QB code that performed initialization was placed in the main form's 
  87. Form_Load procedure.  All Declare's were removed.  Most of the above changes
  88. were accomplished by pressing F5 (run) and letting VB tell me what it didn't
  89. like.  I just used the ol' cut & paste to put things in the right place.
  90.  
  91. I then defined what should happen when each of the controls on the forms were 
  92. activated (usually clicked) and wrote the code into those areas.  Putting the 
  93. drive, directory, and file selection boxes on the screen and activating them 
  94. is phenomenally easy!  
  95.  
  96. The overall concepts of VB are a little difficult to comprehend at first but 
  97. then it clicks and it all becomes quite simple.  I would highly recommend that
  98. you take the tutorial before doing anything.  If you don't, you will not 
  99. comprehend what's going on and will probably get disgusted and quit.
  100.  
  101. This conversion took about a day to do because of having to learn VB.  If I 
  102. had to do it again I could probably complete it in an hour or less.  Please
  103. note that the code has not been "cleaned up" - some debugging code may still
  104. be there.
  105.  
  106. RECOMMENDED ADDITIONS:  
  107.  
  108. Want some practice with VB?  Why not add:  A screen preview of output while 
  109. printing (or before printing or instead of printing) and status display of 
  110. percent completed.  
  111.  
  112. If anyone adds this capability or changes the code in some other way, please 
  113. be kind enough to send me a copy of the source code.
  114.  
  115. Please send comments or suggestions to:
  116.  
  117.      Dennis Scott
  118.      CompuDirect
  119.      7711 Butler Road
  120.      Myrtle Beach, SC  29575-6628
  121.      (803)650-7460
  122.      CompuServe ID:  71360,3701
  123.  
  124. DISCLAIMER:
  125.  
  126. The standard disclaimer applies:  Use this program at your own risk.  I will
  127. not be held responsible for anything!
  128.  
  129.  
  130. UPDATES:
  131.  
  132. Version 1.1, December 18, 1991.  Added the following features:
  133.  
  134.   1.  Status display to give an indication that the program is really printing.
  135.       It is also used to display totals, source file, and destination.
  136.  
  137.   2.  Added the capability to set the line length which in effect allows the
  138.       margins to be set.  This feature was added so that people could use a 
  139.       hole punch if needed (added at the request of Norman Levenstein; 
  140.       70366,140).  With this set to other than the default, recommend that 
  141.       you edit your text file so that its line length is equal to or less than 
  142.       this setting.  Otherwise, the lines will wrap at the right edge (or be 
  143.       cut off if line wrap is turned off).
  144.  
  145.   3.  Added the ability to cancel before starting to print side 2, i.e., if the 
  146.       first side is not what you really wanted then why print the second side.
  147.  
  148.   4.  Cleaned up the code somewhat.  It's still not real pretty but this is a 
  149.       free program!
  150.  
  151. Version 1.2, March 9, 1993.  
  152.  
  153.   1.  Changed info screens to reflect our change of address and telephone
  154.       number.
  155.  
  156.   2.  Cleaned up the code a little more.  Still not great but better.
  157.  
  158.   3.  Added a new file called SOURCE.DOC to the distribution archive.  It
  159.       is the source code listing from version 1.0 and is included so that
  160.       people without Visual Basic can see the source code and thus make a
  161.       determination of whether to start using VB or not. This file is not
  162.       needed to use nor change VB Book.
  163.  
  164. Version 1.3, March 30, 1993.
  165.  
  166.   1.  Added A4 capability at the request of Mick Ellis of Cogent Software, 
  167.       Letchworth, Herts., England.
  168.       
  169.       NOTE:  I do not have the capability to thoroughly test this added
  170.       ----   feature due to the lack of A4 paper here in the States.  The
  171.              code 'should' work but if anyone finds a fault please let
  172.              me know.
  173.              
  174.   2.  Changed the 'Print to File' section.  It now creates two files
  175.       instead of just one.  With only one PRN file being created, it was
  176.       not possible to reinsert the paper in the middle.  To use the two
  177.       PRN files, first copy 1xxxxxxx.PRN to the printer.  When done 
  178.       printing, reinsert the paper in the printer and copy 2xxxxxxx.PRN
  179.       to the printer.  Be advised that these two files are NOT ASCII
  180.       files -- they have printer codes imbedded within and therefore
  181.       you must use the following command when copying to the printer:
  182.       
  183.         COPY 1xxxxxxx.PRN PRN /b
  184.         ... reinsert paper then
  185.         COPY 2xxxxxxx.PRN PRN /b
  186.         
  187.       Of course, replace the x's with the proper filename.
  188.       
  189.       When prompted to enter an output filename, if you use a filename
  190.       prefix of 8 characters in length, the last character will be dropped
  191.       in order to put a '1' on the front of the filename.  This is a DOS
  192.       limitation not mine.
  193.       
  194.   3.  If you have tabs in the document you want to print, you may want to 
  195.       remove them before processing with VB Book.  Otherwise, VB Book will 
  196.       print the tabs as 8 spaces which could upset your line spacing and cause
  197.       text to wrap (if on) or be cut off at the right margin.  If your
  198.       printouts 'bleed over' to the next page for no apparent reason,
  199.       you probably have tabs in the document that need to be removed.
  200.  
  201.   4.  VB Book will now yield time to other running applications while
  202.       computing the number of pages and when printing.  
  203.  
  204.   5.  Removed the blacked out background screen so that users can now
  205.       see the desktop.  A fullfilment of another request by Mick Ellis.
  206.  
  207.   6.  VB Book no longer ends when finished printing but rather returns
  208.       to the main screen.  Choose 'Cancel' to quit the program.
  209.  
  210.   7.  NOTE:  The current version of VB Book does not use Windows printing 
  211.       facilities.  It bypasses Windows and sends raw LaserJet printer codes 
  212.       directly to the printer.  A future version (hopefully) will have the 
  213.       ability to print preview and select an optional Windows font.
  214.       
  215.   8.  Note that the only size limit on an input file is that it can not
  216.       be larger than 512 output pages.  I have tested VB Book on input
  217.       text files as large as 200K -- not even a burp!
  218.  
  219. IF ANYONE HAS SOME SAMPLE VISUAL BASIC CODE THAT DETAILS SELECTION OF FONTS
  220. AND PRINTING PROPORTIONAL FONTS TO THE PRINTER, PLEASE SEND ME A COPY.
  221.  
  222. I have to work for a living so can't spend forever working on a Free program!
  223. Any code samples that you send will allow me to add features to VB Book in
  224. a more timely manner and may make the difference between getting or not 
  225. getting the features added!  In return, your name will be placed in this 
  226. file as a generous provider and assistant.
  227.  
  228.  
  229.  
  230.  
  231.