Transparent image over two controls with different back colors

I am trying to place a transparent image over two adjacent controls that have different background colors.

I want the image to remain transparent, meaning the Image needs to show the backcolor of each control.

The controls are two Panels set to different background colors and the Image (PictureBox or otherwise) is placed between the two panel controls.

Public Class frmMain 
    Private Img1 As Image = Image.FromFile("C:\xxxx.png") 
Private Sub frmMain_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint 
    e.Graphics.DrawImage(Img1, 5, 5) 
End Sub 

End Class


#visual-basic.net

2 Likes2.20 GEEK