I have a VB.net forms application. The majority of the form is a DataGridView with the cells having a variety of background colors. In the application, when a button is clicked, a PictureBox is created and it is filled with a PNG image. The image is a circle – black outline with a white interior and a transparent background.
Following is the code used to place the picture box:
All of this works fine, but the area outside the circle and inside the PictureBox is white, not transparent. I have searched, but have found nothing to address this issue. Did I miss something obvious? Please help.Code:Dim xpos As Integer = <some number> Dim yPos As Integer = <some number> Dim pba as PictureBox = New PictureBox pba.BackColor = Color.Transparent pba.Height = 70 pba.Width = 70 pba.Location = New Point(xPos, yPos) pba.Image = My.Resources.circle Controls.Add(pba) pba.BringToFront()




Reply With Quote
