By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,163 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,163 IT Pros & Developers. It's quick & easy.

Transparent Form with 2 PNG images with Alpha Channel

P: n/a
I've been trying to get this to work for days. I have a form which needs to
be transparent (only the form background). On the form there are two images
(32 bit PNGs) with alpha channel information, in one case the alpha
information is used to display a shadow, and the other has a shadow and a
few other things. One of these images will change on a random basis (every
five minutes or so) and the other is the background for display data.

If on the main form, I set the TransparencyKey and the Background color the
same, I can get the transparent form, but there is a problem with the
images. The alpha channel data (in this case the shadow), shows as the same
color as the TransparencyKey. I've tried the UpdateLayeredWindow (took care
of the alpha channel) but it seems only to work for a single image, i.e.
this API needs a single bitmap as a source, and once you use it, nothing
else can be done with the form. Alphablend doesn't seem to work, can't get
the background around the image to be transparent.

Has anyone any idea how to get this to work? Most examples I've seen use
updatelayeredwindow and only use a single image.

Thanks in advance
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Hi Allan,

I was away over the weekend. and nobody has picked up on your query. If
you could post a cut-down version of your project with the Form and the two or
three of your pngs, I'll have a play and we'll see if we can work this out

Make it a zip so that I can just load and go. If it's big, you can post it
to me direct (but post a message here too so that I know to go and check the
mail - it's full of virus emails at the moment).

Nov 20 '05 #2

P: n/a
Hi Allan,

Your message has come in just as I'm tying up loose ends and going to bed.
I'll give it a look tomorrow. No promises - I'm no expert in this area. But
I'm curious and interested. :-)

Later Dude,
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.