✅ Cannot make an label background color transparent (On a picture box)
I tried and searched a lot of way of making a background color label transparent. (btw im making it programmatically)
21 Replies
So you can make your picturebox's background property transparent, this way you are showing the form behind it (maybe add a label directly behind your picturebox with a color). You should be able to achieve your goal
this is working, thank you so much
btw i got a little issue if you know how to solve it, when i put Visible of the form false and i run it, the form still shows
i tried with Load event but no result
So like in the future if stuff like this happens, try debug using breakpoints in you application, this tip can go far.
Anyways, Just check a few things:
ensure forms properties are not set to true anywhere else in your code or in the properties window of the form in the designer
make sure the correct form is set as the start up object in your project settings, if its a different form, it will make it visible
in your main method check if the form is set to visible (leading to check 1)
check the form_load function. It's normally used for initialization, you can still try set the visibility to false. Below is an example:
well i got the same code you got there but still nothing as i said and i rly have no idea of how to make it works
This may just lead to timing issues with the forms initialization. Just try move the code itself to the 'Load' event handler method itself instead of trynna use a lambda expression:
alr let me try
This way we attach our function to the load event handler, making sure the code runs when the 'Load' event happens. No timing issues
alright
still didn't work
Try change the event please, so from
this.Load
to this.Shown
ok
this.Shown += Program_Load;
well it seem working, didn't knew about this event
whats the difference between this one and Load?
So the load event is when the form is initialized and loaded into memory, it happens before the form is shown, where'as the shown event happens after the form has been fully displayed for the first time
The choice between using
Load
and Shown
depends on when you need your code to execute in relation to the form's display lifecycle.ahh yes thats why
alr
thank you so much bro
No stress dude <3
you make me save a lot of hours
Haha, I know the feeling
@Silme94 $close
Use the /close command to mark a forum thread as answered
yes i forgot
$close
Use the /close command to mark a forum thread as answered