+ Reply to Thread
Results 1 to 6 of 6

Show picture with transparencies in Image

Hybrid View

  1. #1
    Jens Meier
    Guest

    Show picture with transparencies in Image

    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

  2. #2
    Leung
    Guest

    RE: Show picture with transparencies in Image

    is this give you some hits?

    http://support.microsoft.com/default...kb;en-us;94961



    "Jens Meier" wrote:

    > 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
    >


  3. #3
    Jens Meier
    Guest

    Re: Show picture with transparencies in Image

    "Leung" <Leung@discussions.microsoft.com> schrieb
    > is this give you some hits?
    >
    > http://support.microsoft.com/default...kb;en-us;94961


    Leung,

    thanks for the hint. I've printed it out and will have a look at it; I am
    curious whether I'll be able to adapt it to VBA and my Excel application...
    :-)

    Jens



  4. #4
    NickHK
    Guest

    Re: Show picture with transparencies in Image

    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


    "Jens Meier" <cool.bambus@web.de> wrote in message
    news:42f68cd5$0$18639$14726298@news.sunsite.dk...
    > 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




  5. #5
    Jens Meier
    Guest

    Re: Show picture with transparencies in Image

    "NickHK" <TungCheWah@Invalid.com> schrieb im Newsbeitrag
    > 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



  6. #6
    NickHK
    Guest

    Re: Show picture with transparencies in Image

    Jens,
    No, this is only for worksheets.

    NickHK

    "Jens Meier" <cool.bambus@web.de> wrote in message
    news:42f75aa8$0$18643$14726298@news.sunsite.dk...
    > "NickHK" <TungCheWah@Invalid.com> schrieb im Newsbeitrag
    > > 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
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1