I just checked and had no problem setting a label's BackColor to Transparent. I simply clicked the control, found BackColor in the Properties Windows, and found Transparent in the drop-down box under the Web tab. Note that I'm using Visual Studio 2010, and .NET Framework 4.0. I'm not sure if that makes a difference or not.
This post has been edited by ljfox4: 02 December 2010 - 09:19 AM
no i think you didn't preview it well,.
i tried to put black gradient image behind and put a label and set it's backcolor to transp. but
nothing happened after many times i got a prompt saying it doesn't support transparency on backcolor.,
what shall i do if i want to make a label's backcolor transparent or even just looking like transparent?
VB.NET doesn't support transparent label backcolor.
When you set the backcolor of a control to transparent it will take it parents background.
So if your label is for example over a picturebox and its parent is the form the forms background will show. So add the control to the picturebox's controls collection.
This post has been edited by Luc001: 02 December 2010 - 11:19 AM
works fine, thank goodness.so you say i always need to put extra picture box that can get transparent and will be no problem for any label on front?,because picture box can be transp.,
thanks for that luc001,.
I also tried to put a background on the form then set the label transparent and it also worked good
quicker than adding another step which is putting a picturebox setting it's background to transparent then the label over it set to transp...
how if the parent of the label is a picturebox?
i tried it's not working and it only accepts the form as it's only parent.,
so if i overlay a label behind a picturebox it doesn't show transparency as if
i'm overlaying a net above a fish picture.,it should look like the fish is inside the net.,
You may consider using GDI+ and layering the graphics. When you are drawing the first thing in is the bottom-most layer and you build on that. You can use a base image as the BackgroundImage then draw other images on top of that and of course your text as well. Gif's work great for images that have transparent parts/pixels.