BUG: Line/Circle Methods Don't Print as Transparent on Win95

Last reviewed: November 12, 1997
Article ID: Q176634
The information in this article applies to:
  • Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0 on the following platform: Win95
  • Microsoft Visual Basic Standard, Professional, and Enterprise Editions for Windows, version 4.0 on the following platform: Win95

SYMPTOMS

When you use the Circle method to print circles or the Line method to print rectangles, the circles do not print as transparent so that overlapped portions of the shapes appear. The problem occurs even when the FillStyle property of the Printer object is set to Transparent (1).

CAUSE

This problem occurs when using the Line or Circle methods on Windows 95.

RESOLUTION

To work around this problem, toggle the FillStyle property of the Printer object prior to using the Line or Circle method to print as transparent graphical objects:

   Printer.FillStyle = 2
   Printer.Print ""
   Printer.FillStyle = 1

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start a new project. Form1 is created by default.

  2. Add a CommandButton to Form1.

  3. Add the following code to the Click event of Command1:

          'Print concentric circles
          Dim i as Integer
          For i=100 to 1000 Step 100
    
             Printer.Circle (1000,1000), i
          Next
    
          'Print 10 rectangles
          For i=100 to 1000 Step 100
             Printer.Line (5000, 1000) - (5000 + i, 1000 + i), , B
          Next
    
          Printer.Enddoc
    
    

  4. Press the F5 key to run the project. Click Command1 to print. In the output, note that only the outer circle appears instead of ten concentric circles as you would expect.

  5. To apply the workaround, add the following code to the Form_Load event of Form1:

          Printer.FillStyle = 2
          Printer.Print ""
          Printer.FillStyle = 1
    


Additional query words: solid fill clear
Keywords : VB4WIN vb5all VBKBPrinting
Version : WINDOWS:4.0,5.0
Platform : WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 12, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.