Label Background

Now, I have a form application. There is a Text named label4 in the form in my form application. Even though I set the background color of this Text to "Transparent", the background color appears black. How can I fix it?! (I'm using .NET 4.0.)
No description
No description
17 Replies
this_is_pain
this_is_pain7mo ago
in winforms Transparent doesn't make the background actually transparent this feature is supported only in more recent frameworks doing that in .net 4 could be tricky
leowest
leowest7mo ago
have u tried setting the parent of the label to the picturebox of the image behind it otherwise u might need to inherit from label and make your own
milyonlaryapmakmeslekaski
no, how
leowest
leowest7mo ago
label4.Parent = pictureboxname;
leowest
leowest7mo ago
yes, if that does not work then u have to make your own label https://www.doogal.co.uk/transparent and that's why many people move over to newer frameworks like WPF, Avalonia which are much better tools to create ui with custome design
milyonlaryapmakmeslekaski
I posted the same code, but nothing changed. So a new label hasn't arrived yet?
leowest
leowest7mo ago
huh? u mean the label is not showing?
leowest
leowest7mo ago
then u will have to do like in the link above and use the custom control u create
milyonlaryapmakmeslekaski
I copied/pasted the code from the site you posted, but it doesn't appear.
leowest
leowest7mo ago
copy paste is not good u have to modify things in order for it to work in your project, if u have a github u can post your code to I can take a look
milyonlaryapmakmeslekaski
I don't know how to use github, I can send it via DM if you want.
leowest
leowest7mo ago
I dont take dms either github or $paste to the site below
MODiX
MODiX7mo ago
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
leowest
leowest7mo ago
github would be easier as I can clone and test
milyonlaryapmakmeslekaski
You know what, never mind... I gave up waiting for that label. If it's that much trouble, I'd rather not do it at all.

Did you find this page helpful?