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