Transparent PictureBox Over Another PictureBox with Image

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hola,

I have two PictureBox controls. PictureBox1 has an image. And PictureBox2 doesnt. PictureBox2 has just a 50% transparent sold color. So if I place PictureBox2 over PictureBox1, PictureBox2 will entirely cover part of PictureBox1.
Actually, I want PictureBox2 to show whats behind it.

<pre class="prettyprint PictureBox2.Parent = PictureBox1
PictureBox2.BackColor = Drawing.Color.Transparent
PictureBox2.Location = New Point(PictureBox2.Left - PictureBox1.Left, PictureBox2.Top - PictureBox1.Top)[/code]
<br/>
Well, if I do that, PictureBox2 will lose its entire color. So you wont be even able to tell where PictureBox2 is at. If I change PictureBox2s border styles, PictureBox2 can be barely visible with its borders except that you cant control its
border color.

So is there any way by which I can maintain PictureBox2s transparency and its sold color while PictureBox2 shows the background image from PictureBox1?

Thanks a lot.

Donkey

View the full article
 
Back
Top