Transparent control in .net (currently using picturebox)
Posted on 2004-04-09
I have transparent gif. I load my gif into my picturebox
pb.image = image
The picturebox will not be transparent, it will get the parent forms background color.
How can I make it be transparent?
I have tried alot of things, for example:
Dim bm As New Bitmap(pb.Image)
MyBase.Image = bm
I tried to rewrite the Paint-event in the picturebox and trying to paint my picturebox with the graphic-object and using ColorMatrix to get an alpha on the background but I only succeed changing the alpha for the whole picture.
I have also tried using a panel but nothing seems to work.
If you have an idea of a form control that can hold a picture and have transparent background and that will solve my problem I will give you the points!
Nothing I have tried works...