You are correct in your assumption.
Transparency in winforms does not mean that the object is actually transparent. Instead, it means that it will display it's parent object instead of it's background, including it's background, images and text, but not including any other controls on it, hence your problem.
Since the parent control of your top most picture box is not and can not be the other picture boxes, the fact that your top most picture box have a transparent background will not help.
Unfortunately, using the form's TransparencyKey
property will also not help for this. (It will make the selected color transparent, but will yield unexpected (and usually undesired) results.
In order to achieve your goal, you will have to follow OneFineDay's advice in the comments, and use Graphics
to draw the image yourself.
Fortunately, this is very easy to do:
Public Sub DrawImage(Image as Image, Location As Point)
Using(Dim g as Graphics = Me.CreateGraphics())
g.DrawImage(Image, Location)
EndUsing
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…