Microsoft KB Archive/87767

= BUG: Generic / Text Only Printer Driver Prints 66 Lines =

Article ID: 87767

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition
 * Microsoft Windows 3.0 Standard Edition
 * Microsoft Windows 3.1 Standard Edition

-



This article was previously published under Q87767



SYMPTOMS
Choosing the Generic / Text Only printer drivers in Microsoft Windows versions 3.0 and 3.1 may cause incorrect printing results in Visual Basic for Windows. Visual Basic expects to print 66 lines per page, but the generic printer driver only prints 60 lines per page. This results in six lines being printed on a separate page.



WORKAROUND
To work around the problem, select a different printer driver.



STATUS
Microsoft has confirmed this to be a bug in the Generic / Text Only printer driver included with the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available



MORE INFORMATION
When using the Generic / Text Only printer driver, the example below prints 60 lines on the first page, 6 lines on the second page, and then 60 lines on the third page. You may also encounter some lines being overwritten also with the Generic / Text Only driver supplied with Windows version 3.0.

Steps to Reproduce Problem
 From the Windows Control Panel, choose the Printers icon. From the Printers option, choose the Add Printer button. Select the Generic / Text Only printer driver. Choose the Install button. There is additional help on pages 145-147 of the &quot;Microsoft Windows version 3.0 User's Guide.&quot; Note: You may need your Windows disks to install the Generic / Text Only driver. After the Generic / Text Only driver has been installed and is the default printer, you can proceed to run a test in Visual Basic. Start Visual Basic or if Visual Basic is already running, choose New Project from the File menu (ALT, F, N). Form1 is created by default.</li>  Add the following code to the Form_Click event procedure of Form1: Sub Form_Click For i% = 1 to 200 Printer.Print &quot;This is a test of line number &quot;;i% Next i%     Printer.EndDoc End Sub

</li> From the Run menu, choose Start to run the program.</li> Run the same code, by pressing the F5 function key and then click Form1 once, to run the test. This should produce five pages of text, the first and third pages should have 60 lines of text, while the second and fourth pages will only contain 6 lines of text. The fifth page should be half covered with lines of text. This is where the problem is, Visual Basic sends 66 lines to be printed per page, but the Generic / Text Only printer driver is setup to print only 60 lines. Then the printer driver does a formfeed, after printing the 6 lines on the second page to go on to the third page. The printer driver may also display a problem on some lines of code being overwritten (every fifth line may be overwritten).</li></ol>

Additional query words: buglist1.00 buglist2.00 2.00

Keywords: kbbug KB87767

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.