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.)
20 Replies
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
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
no, how
label4.Parent = pictureboxname;
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
I posted the same code, but nothing changed. So a new label hasn't arrived yet?
huh?
no text arrived
u mean the label is not showing?
yes
then u will have to do like in the link above
and use the custom control u create
I copied/pasted the code from the site you posted, but it doesn't appear.
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
I don't know how to use github, I can send it via DM if you want.
I dont take dms
either github or $paste to the site below
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!
github would be easier as I can clone and test
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.