Hello,

I'm having this problem with the transparency in GDI+.
I have 2 pictureBoxes, one over the other, and one of them has their alpha color set to magenta(255, 0, 255).
My goal is that when the upper pictureBox has a picture on it with a section of the magenta color, that section on the upper pictureBox would show the pictureBox that's below it, at that section, like drawing with 2 layers.

Now, the way I did it, was define the lower picture's BackColor as BackColor::Control(Default), and the upper's as BackColor::Transparent, and when the picture is put to the upper box, the following would be part of the painting code:

bmp->MakeTransparent(Color::Magenta);

What this does is when I put a transparent section on the upper, it would show the color of the panel below the pictureBox below it, which I actually want to show.

My question is why does it not show the pictureBox below, and how can I make it so that it does?

Thanks much for any comments.

I'm sorry for bumping, but can anyone atleast tell me if it's even possible at all? Just so I know that I'm not wasting my time?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.