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