BUG: 3D Button Loses 256-Color Palette When Load 2nd BitmapLast reviewed: June 21, 1995Article ID: Q100193 |
The information in this article applies to:
- Microsoft Visual Basic programming system for Windows, version 3.0
SYMPTOMSIf a second 256-color bitmap is loaded in another control after loading a 256-color bitmap in a 3D command button, the palette on the 3D command button is not restored.
CAUSEThe 3D command button control that is part of THREED.VBX does not restore its own palette. Instead, it uses the current system palette when a new 256-color bitmap is load into another control in the project. In effect this causes the 3D command button to use the palette of the new bitmap.
WORKAROUNDTo work around this problem, force the current system palette to be the palette used by the 3D command button and refresh the 3D command button. For example, make the following changes to the Picture2_Click event procedure listed in step 4 of the More Information section:
Sub Picture2_Click () Picture2.Picture = LoadPicture("c:\vb3\rainbow.dib") ' Add the following two lines to force the picture that has ' the same palette as Command3d1 to the top of the ZOrder: Picture1.ZOrder 0 Command3d1.Refresh End SubUsing the ZOrder method with zero as an argument moves Picture1 to the top of the ZOrder. This makes the palette for Picture1 the current system palette. Because Picture1 and Command3d1 have the same bitmap loaded, you can clear up the problem by forcing the palette of Picture1 to be the system palette and refreshing the Command3d1 control.
STATUSMicrosoft has confirmed this to be a bug in 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.
Steps to Reproduce Problem
|
Additional reference words: buglist3.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |