Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Icon transparency

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
I've run into an odd problem with one of my forms. I created several large command buttons that have pictures on them. These pictures are from both .ico and .bmp files. The .bmp files look fine, but the .ico files are using the wrong color for transparency. They are not using the color of the command button, but rather whatever color the _screen.backcolor is set to. My backcolor is set to dark gray (128,128,128) while my command buttons are light gray (192,192,192). If I change _screen.backcolor to anything else before I launch the form, the transparent colors for the icons becomes whatever I set it to, not the color of the command buttons.

Further changes to the _screen.backcolor are ignored until I restart the app. It seems to work properly if I run the form BEFORE changing the backcolor, but I can't do it this way in my app because I don't know when the user will open that particular form. And, again, the .bmp files work just fine, it's only .ico files that this happens to.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top