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

ID: Q176634

The information in this article applies to:

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 or Windows 98.

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 kbVBp500bug kbVBp400bug kbVBp kbVBp600bug kbDSupport kbdsd kbPrinting Issue type : kbbug

Last Reviewed: August 24, 1998