Hi,
The picturebox does not have a transparent color property. I
would use a form instead.
Dim frm As Form
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
PictureBox1.Bac kgroundImage = Image.FromFile( "C:\bliss.b mp")
End Sub
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim bm As New Bitmap(PictureB ox1.Width, PictureBox1.Hei ght)
Dim g As Graphics = Graphics.FromIm age(bm)
g.Clear(Color.W hite)
g.FillEllipse(B rushes.Red, 20, 20, 20, 20)
bm.MakeTranspar ent(Color.White )
g.Dispose()
frm = New Form
With frm
.FormBorderStyl e = FormBorderStyle .None
.Size = PictureBox1.Siz e
.TopLevel = False
.Parent = PictureBox1
.BringToFront()
.TransparencyKe y = SystemColors.Co ntrol
.BackgroundImag e = bm
.Show()
End With
End Sub
Ken
-----------------
"Ricardo Furtado" <Ri************ @discussions.mi crosoft.com> wrote in
message news:16******** *************** ***********@mic rosoft.com...
in my app i must have several pictureboxes over the others. Some
pictureboxes
just have a couple of lines or rectangles, and absolutly nothing more but
the
image is an .BMP. So, my problem is that i need to see whats beind those
pictureboxes and at the same time showing, the lines and rectangles that
exist on the pictureboxes that are at the top. Because i just can't copy
the
image to the other picturebox (because i'll have to be able to control
that
image, later) i need to know how can i turn transparant the pictureboxes
that
are at the top. I've tryed the following code but it didn't work because
what
it does is to copy the background color of the main picturebox to the
picturebox at the top
dim Logo as new Bitmap(CompanyL ogo.Image)
Logo.MakeTransp arent(Logo.GetP ixel(1,1))
CompanyLogo.Ima ge=Logo;