?
Solved

Make image background on button transparent

Posted on 2005-03-11
12
Medium Priority
?
206 Views
Last Modified: 2010-04-16
See my screenshot:  

http://www.knowltonsoftware.com/junk/trans.gif


I want to make the white background the transparent color so the button shows through
0
Comment
Question by:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 8

Accepted Solution

by:
AaronReams earned 2000 total points
ID: 13521814
Hi knowlton,

1) Add an image list your form
2) Add the image to the image list
3) Set the transparent color to whatever you want (white in your case)
4) Set the buttons imagelist to that imagelist
5) Set the index of the image in the imagelist in button's properties.

That's it!


Regards -A.R
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13521820
Will this support TOGGLING between TWO IMAGES?
0
 
LVL 8

Expert Comment

by:AaronReams
ID: 13521829
If you want to toggle between two images...  Add two images to the imagelist and then set the button's image index property accordingly.

Cheers -A
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13521839
Gotcha!

Working.....coming along very fast....I think I get it......
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13521962
Okay Aaron:

The Image assignment from the ImageList to the Button at runtime is working fine....as is the Image Toggling.

BUT

The image background is still NOT transparent....still showing up white......

I am missing something dumb here I am sure.......
0
 
LVL 8

Expert Comment

by:AaronReams
ID: 13522059
Hmmmm.  Strange.  

Are you sure you're using bitmaps and not icons?  
Are you sure the transparent color is set to the exact same color as your desired color?

I just tested this and getting transparent images to work can be a little quirky.  Make sure you have the TransparentColor property set to the color you want before you add the images to the image list.

Hope this helps. -A
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13522121
>>>>>
I just tested this and getting transparent images to work can be a little quirky.  Make sure you have the TransparentColor property set to the color you want before you add the images to the image list.




That was it.............geeez..........I would call that a BUG.........LOL......
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13522129
0
 
LVL 8

Expert Comment

by:AaronReams
ID: 13522139
Yeah, I would think that's a bug also.  

Right off hand, I'm not sure about your other question... sorry.  I'll try take a closer look at it if I get a chance later in the day.  

Good luck -A
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 13522143
Thanks Aaron!!!!   You do good work in this TA.....I always appreciate your help!!!
0
 
LVL 8

Expert Comment

by:AaronReams
ID: 13522149
Thanks knowlton!  Always glad to help.  -A.R
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question