BUG: Control Displays Dithered Background in 256-Color Mode

Last reviewed: December 1, 1997
Article ID: Q177081
The information in this article applies to:
  • Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0

SYMPTOMS

A form using a custom palette dithers the background color of any control placed on the form when the project is run on a computer configured to display 256 colors. This symptom does not occur on a computer configured to display more than 256 colors.

RESOLUTION

To work around this problem:

  • Run the Visual Basic program on a system configured to display more than 256 colors.

        -or-
    
  • Do not use a custom palette.

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

NOTE: To reproduce this problem, your system display should be set to 256-color.

  1. Start a new Standard EXE project in Visual Basic. Form1 is created by default.

  2. Add a Frame control to Form1.

  3. Set the following properties for Form1:

       Property                 Value
       --------                 -----
       Picture                  pastel.dib
       PaletteMode              1-UseZOrder
    
       The file pastel.dib is located in the Samples\PGuide\PalMode directory
       where you installed Visual Basic.
    
    

  4. Copy the following code to the Code window of Form1:

          Option Explicit
    

          Private Sub Form_Load()
    
             Me.BackColor = RGB(24, 180, 164)
             Frame1.BackColor = RGB(24, 180, 164)
          End Sub
    
    

  5. Press the F5 key to run the program and note that the Frame background appears dithered.

REFERENCES

"Using Relative Palette Colors" topic in Readme.hlp

For more information about Visual Basic and color palettes, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q74908
   TITLE     : SAMPLE: Using the Palette Under Windows


Additional query words: display vga

(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by
Arsenio Locsin Microsoft Corporation
Keywords : vb5all VBKBAX VBKBComp VBKBCtrl
Version : WINDOWS: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: December 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.