Hi,
I finally have it almost working.
On program startup I read in the image I want from disk and establish the
transparency color. This works fine as long as I have a background color
for the form. But soon as I change from a background color to a background
image I get a picture box with a control color around my image.
Dim DisplayImage As New Bitmap("c:\b1.gif") 'on startup
outside the form construct
DisplayImage.MakeTransparent(DisplayImage.GetPixel (0, 0))
Me.PictureBox1.Image = CType(DisplayImage, System.Drawing.Image)
For now I have the last two lines hard coded in the form construct.
Then I have a timer_tick event that
x = x + 1
tick = tick + tick + x
y = 200 + Sin(tick) * 100 'just to get a rather up and
down y value
Me.PictureBox1.Location = New System.Drawing.Point(x, y) 'redraw the
picture box.
This works great as long as I don;t have an image as a background on the
form.
Any thoughts?
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
Hi,
The transparent background will let the picture boxes background to
show through. I believe you want to see the form background instead. I
would draw the gif on the form in the forms paint event instead of using a
picturebox.
Ken
--------------
"Al_C" <ac****@bicnet.net> wrote in message
news:O8**************@TK2MSFTNGP09.phx.gbl... Hi,
I create a form, then place a picturebox on it.
Then I set the picturebox image to a .gif that I have
edited in GIFConstructionSet to create a transparent
background for. But when I run the code, what should be
transparent is not really transparent. Is there a property in
the picture box I need to tweak? I though the whole idea
was to put the transparency information right in the gif file.
Suggestions, clues, pointers?
Any of the above appreciated.
Thanks,
Al