imageflashdelphicanvasshockwave

Image over Flash Animation remains invisible


Good Morning all,

I have a Delphi Application with a Shockwave Flash Animation (Align = alClient). I would like to display a logo over the flash (Image). However, the image always move to the background, under the flash and remains invisible. I tried to draw the picture using Form1.Canvas.Draw which did not work eighter. There is the option to use a Panel over the flash and add my Image into that but it is not soo optical. My Logo is round and I cut of the white borders around it with the property transparent. That would not with a Panel which I cannot make transparent (or round).

Thank you for help


Solution

  • You can make your panel a circle with the following command:

    procedure MakePanelCircle(MyPanel: TPanel; Diameter: integer);
    var
      region1 : hrgn;
    begin
      region1 := CreateRoundRectRgn(0, 0, Diameter, Diameter, Diameter, Diameter);
      SetWindowRgn(MyPanel.Handle, region1, True);
    end;
    

    Look at the documentation of CreateRoundRectRgn because it's normally used to create a rectangle with rounded edges. If you dig a bit further you'll find a guide to make a region based upon your bitmap.

    If you look at the following example Shaping a Form around a Bitmap

    you will learn how to make a region from a bitmap.