C
C#5mo ago
antalya

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