3
Good morning, I came across a problem in my application Windows Form C#, I’m trying to apply an image with low opacity() background to my panel1
, but the image when inserted gets 100% opacity, giving conflict with what is above the background. I first tried to put the image as the background of the panel and it didn’t work. As working with Bitmaps I can use transparent background I thought it could be the solution to the problem, but without success as well. Something can be done so that the image does not lose the transparency?
Bitmap config;
private void FormConfig_Load(object sender, EventArgs e)
{
config = new Bitmap(@"C:\Users\...\background_config.png"); //imagem quase transparente
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawImage(config, new Point(0, 0));
}
Felipe, good morning to you! I’m not using code to test the Bitmap class, but there’s no Overload on it that tells you the type of extension or something like that when you upload the image?
– Angelo Simonato