home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_books / vbbook12 / vbbook12.txt < prev    next >
Text File  |  1993-03-09  |  7KB  |  156 lines

  1.                           VB BOOK Version 1.2
  2.  
  3. Utility to print ASCII text files to LaserJet Series II, IIp, or III 
  4. printers in booklet format (4 pages to a sheet).
  5.  
  6. Based on the program, PC BOOK, by Jay Munro, Copyright 1990 PC Magazine - 
  7. Ziff Davis - Jay Munro.
  8.  
  9. Originally written by Jay Munro in Quick Basic 4.5 and converted to Visual 
  10. Basic by Dennis Scott on September 1, 1991.  Updated to version 1.2 
  11. March, 1993.  
  12.  
  13. USE AND DISTRIBUTION:
  14.  
  15. VB Book Version 1.2 can be freely used and distributed by any person or 
  16. company but it's not to be sold.  Distributors and BBS operators are 
  17. permitted to charge distribution fees as they see fit.
  18.  
  19. PURPOSE:  
  20.  
  21. VB BOOK prints README and similar ASCII files in booklet format on an HP 
  22. LaserJet II, IIp, or III printer.  Uses two-sided printing in landscape mode, 
  23. with Line Printer font so that four standard pages of up to 80 characters 
  24. per line, 66 lines per page are printed on each sheet without formatting 
  25. changes.
  26.  
  27. REMARKS:
  28.  
  29. The filename can designate any ASCII text file in which each line is 
  30. terminated with a Carriage Return/Line Feed combination.  Page Feed characters 
  31. can be added to force breaks in addition to those implicit in the 60-line 
  32. (68-line if a header is used) page length.
  33.  
  34. The original switches in PC Book have been replaced with Windows Checkboxes.
  35. Any or all of the Checkboxes can be used to create a one-line header that 
  36. prints the filename, page number, and date, on all but blank pages.  The Wrap 
  37. Checkbox causes lines exceeding the configurable line length to wrap; by 
  38. default such lines are wrapped.  Configurable line length was added in version
  39. 1.1 (see "Updates" below) so that space could be left on the left side for
  40. hole punching.
  41.  
  42. Output can be directed to LPT1, LPT2, COM1, COM2, or File.  Noted that
  43. you must set the proper parameters for your port before printing to a COM
  44. port.  If File is selected, you will be prompted to enter an output filename.
  45.  
  46. VB BOOK sequences the page printing so that all side-one pages are printed in 
  47. one pass.  The sheets are then put back in the LaserJet paper tray and all 
  48. side-two pages are printed.  The finished booklet can then be created with a 
  49. single fold.  When using the normal (top) LaserJet output bin the pass-one 
  50. sheets should be reinserted in the paper tray without any relative change
  51. in orientation.  If rear output from the printer is used, the sheets must be
  52. turned over as a group before reinsertion.  If you wish to hole punch the 
  53. finished product, set the line length to something less that 80.  Line 
  54. lengths of 75 to 76 seem to work real well for hole punching.
  55.  
  56. REQUIREMENTS:
  57.  
  58. VB Book requires Windows 3.x.  The Visual Basic Run Time file, VBRUN100.DLL, 
  59. must be in the path (recommend putting it in your Windows directory).  
  60. Modifications will require Microsoft Visual Basic Version 1.0 or greater.  
  61. Both the executable and the source files for VB Book are provided.
  62.  
  63. COMMENTS TO QuickBASIC PROGRAMMERS:
  64.  
  65. The conversion of PC Book from QuickBASIC to Visual Basic (VB) was undertaken 
  66. as an exercise in converting original QuickBASIC (QB) source code into VB code.
  67. It was surprisingly easy!  
  68.  
  69. The hardest part was deciding HOW the screens (forms in VB) should look.  
  70. Actually designing the forms is very easy.  Once the forms were designed, I 
  71. just used "load text" to get the original QB code into the main form.  VB does 
  72. almost everything automatically.  For example, all SUBs are automatically 
  73. created and the old code placed in them.  
  74.  
  75. Some things will need to be changed, of course.  Any input from the user 
  76. (QBs Input, Line Input, and Inkey commands) needs to converted to "InputBox$" 
  77. functions.  Similarly, the "print" statements (with corresponding Locate's) 
  78. were converted to "MsgBox" functions or a form created to place them onto.  
  79. The QB code that performed initialization was placed in the main form's 
  80. Form_Load procedure.  All Declare's were removed.  Most of the above changes
  81. were accomplished by pressing F5 (run) and letting VB tell me what it didn't
  82. like.  I just used the ol' cut & paste to put things in the right place.
  83.  
  84. I then defined what should happen when each of the controls on the forms were 
  85. activated (usually clicked) and wrote the code into those areas.  Putting the 
  86. drive, directory, and file selection boxes on the screen and activating them 
  87. is phenomenally easy!  
  88.  
  89. The overall concepts of VB are a little difficult to comprehend at first but 
  90. then it clicks and it all becomes quite simple.  I would highly recommend that
  91. you take the tutorial before doing anything.  If you don't, you will not 
  92. comprehend what's going on and will probably get disgusted and quit.
  93.  
  94. This conversion took about a day to do because of having to learn VB.  If I 
  95. had to do it again I could probably complete it in an hour or less.  Please
  96. note that the code has not been "cleaned up" - some debugging code may still
  97. be there.
  98.  
  99. RECOMMENDED ADDITIONS:  
  100.  
  101. Want some practice with VB?  Why not add:  A screen preview of output while 
  102. printing (or before printing or instead of printing) and status display of 
  103. percent completed.  
  104.  
  105. If anyone adds this capability or changes the code in some other way, please 
  106. be kind enough to send me a copy.
  107.  
  108. Please send comments or suggestions to:
  109.  
  110.      Dennis Scott
  111.      CompuDirect
  112.      7711 Butler Road
  113.      Myrtle Beach, SC  29575-6628
  114.      (803)650-7460
  115.      CompuServe ID:  71360,3701
  116.  
  117. DISCLAIMER:
  118.  
  119. The standard disclaimer applies:  Use this program at you own risk.  I will
  120. not be held responsible for anything!
  121.  
  122. UPDATES:
  123.  
  124. Version 1.1, December 18, 1991.  Added the following features:
  125.  
  126.     1.  Status display to give an indication that the program is really printing.
  127.         It is also used to display totals, source file, and destination.
  128.     
  129.     2.  Added the capability to set the line length which in effect allows the
  130.         margins to be set.  This feature was added so that people could use a 
  131.         hole punch if needed (added at the request of Norman Levenstein; 
  132.         70366,140).  With this set to other than the default, recommend that 
  133.         you edit your text file so that its line length is equal to or less than 
  134.         this setting.  Otherwise, the lines will wrap at the right edge (or be 
  135.         cut off if line wrap is turned off).
  136.  
  137.     3.  Added the ability to cancel before starting to print side 2, i.e., if the 
  138.         first side is not what you really wanted then why print the second side.
  139.  
  140.     4.  Cleaned up the code somewhat.  It's still not real pretty but this a free
  141.         program!
  142.  
  143. Version 1.2, March 9, 1993.  
  144.  
  145.     1.  Changed info screens to reflect our change of address and telephone
  146.         number.
  147.         
  148.     2.  Clean up the code a little more.  Still not great but better.
  149.     
  150.     3.  Added a new file called SOURCE.DOC to the distribution archive.  It
  151.         is the source code listing from version 1.0 and is included so that
  152.         people without Visual Basic can see the source code and thus make a
  153.         determination of whether to start using VB or not. This file is not
  154.         needed to use nor change VB BOOK.
  155.         
  156.