Transparancy becomes black |
Post Reply |
Author | |
mweinberger
Newbie Joined: 06 April 2005 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 06 April 2005 at 10:57pm |
Hi all,
I'm using the command bar conrol with VB6. I'm using icons (256, 24x24) that I place in an ImageList. When I first add the icons to the ImageList and run my program all is fine, however on subsequent launches the icons in the ImageList corrupt themselves. What happens is that the transparent area becomes black. 24x24 is the most affected, whereas 32x32 appears to work fine. 16x16 takes longer. What's causing this problem and how do I fix it. Thanks in advance, Martin Edited by mweinberger |
|
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
Hi, I have experienced this exact same problem in the past. It is actually not a problem with the CommandBars control, but with the ImageList control. It has some quirks when dealing with multiple 256-color palette bitmaps. You will see the same problem if you use a TreeView or ListView control instead of a CommandBars control. Oftentimes, the problem only appears after you close the project is and re-open it. The solution is to save your bitmaps as true-color bitmaps instead, even if the icons only use a few colors. Since the icons are small, they do not take much disk space anyway. After converting all your icons to 24-bit bitmaps, clear all of your ImageList icons (or delete the control) and then load each image again. Using true-color bitmaps will prevent images in the ImageList control from getting corrupted. I hope this helps! |
|
mweinberger
Newbie Joined: 06 April 2005 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Thanks gshawn! I'll give it a try. There was an MSDN article that
stated to reinstall SP6 on VB6. It indicated that the problem is with
different versions of the DLL. I was also using the ".Icons = " and the
".AddImageList = " properties. I got rid of the ".Icons = " property.
These acts seems to have fixed the problem. At least for now. What you
said makes perfect sense. Thansk!!!!!!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |