Show picture with transparencies in Image

J

Jens Meier

Hello everybody,

I am having the following problem, I have got stuck after trying a lot
of things...:
I would like to show a gif image with some transparent areas in an Image
control on top of another image in the same Image control.

I.e: The Image control already contains an picture and I would like this
picture to stay visible in the transparent areas of the superposed
picture. I.e.: The superposed picture should only cover those areas of
the underlying picture where it is not transparent.

Sounds logical, but unfortunately Excel covers the whole area of the
Image control with a gray background to the picture. I.e., the
transparent areas are filled with gray, instead of letting the
underlying picture shine through.

I am not familiar with the use of API functions, but I have heard about
the TransparentBlt function which allows to set a transparent color.
Does this make sense in my case?

Thanks a lot for your help!
Jens
 
N

NickHK

Jens,
As a different tack, if you can place the pictures directly on a worksheet,
you can set:
With ActiveSheet.Shapes("Picture 1").ShapeRange.PictureFormat
.TransparentBackground = msoTrue
.TransparencyColor = RGB(12, 124, 184)
End With

And then stack them on top of each other.

NickHK
 
J

Jens Meier

NickHK said:
As a different tack, if you can place the pictures directly on a worksheet,
you can set:
With ActiveSheet.Shapes("Picture 1").ShapeRange.PictureFormat
.TransparentBackground = msoTrue
.TransparencyColor = RGB(12, 124, 184)
End With

And then stack them on top of each other.

NickHK,

is there a possibility to make this work without putting the pictures on a
worksheet, but rather display them on a userform?

Thanks!
Jens
 
N

NickHK

Jens,
No, this is only for worksheets.

NickHK

Jens Meier said:
NickHK,

is there a possibility to make this work without putting the pictures on a
worksheet, but rather display them on a userform?

Thanks!
Jens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top