C# TransparencyKey question

B

bigdunka

I am working on layering a few picture boxes on top of each other in a
basic 3D grid, viewed from front and a little to the right, using
Visual Studio 05. I have color 128, 254, 128 set as the form's
transparency key and the corners of my one image that I am overlapping
that same color. The transparency works great and I can see right
through it, the problem is that I need to set it up to view the
picture box below it, not clean through.

Is there any way to set up the transparency to see picture boxes below
the transparent areas? Or does this need to be set up a different
way?

Thanks in advance for any help!
 
A

Alberto Poblacion

I am working on layering a few picture boxes on top of each other in a
basic 3D grid, viewed from front and a little to the right, using
Visual Studio 05. I have color 128, 254, 128 set as the form's
transparency key and the corners of my one image that I am overlapping
that same color. The transparency works great and I can see right
through it, the problem is that I need to set it up to view the
picture box below it, not clean through.

Is there any way to set up the transparency to see picture boxes below
the transparent areas? Or does this need to be set up a different
way?

The transparent areas "fall through" to the control that is the parent
of the transparent one. This means that if a picturebox belongs to the
Controls collection of the Form, the tansparent areas will show the
background of the form. If there is another picturebox in the middle, you
need to have your picture box on top contained in the picturebox in the
middle, rather than contained in the form.
The designer in Visual Studio does not let you drop a picturebox on
another picturebox (or at least I haven't been able to do it), so you will
have to arrange this setup through code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top