Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Transparancy becomes black
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Transparancy becomes black

 Post Reply Post Reply
Author
Message
mweinberger View Drop Down
Newbie
Newbie
Avatar

Joined: 06 April 2005
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mweinberger Quote  Post ReplyReply Direct Link To This Post Topic: Transparancy becomes black
    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
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2005 at 11:52pm

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!

Back to Top
mweinberger View Drop Down
Newbie
Newbie
Avatar

Joined: 06 April 2005
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mweinberger Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2005 at 1:51pm
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!!!!!!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.