Search code examples
c#wpfflashwpf-controls

How to use .swf in c# with Transparent background


is there's a way to use flash file inside WPF c# application with Transparent back ground ? i tried this

  public  Form1()
    {
        InitializeComponent();
        getdata();
        SetStyle(ControlStyles.SupportsTransparentBackColor, true);
        axShockwaveFlash1.Movie = @"c:\users\ahmed\documents\visual studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\loading10.swf";
        axShockwaveFlash1.Play();


    }

and this

            axShockwaveFlash1.BackgroundColor =0;

and many below ! any idea ? i still get back color behind the file .


Solution

  • You can't do it by code at runtime.

    Solution : Set (WMode) transparency via menu in the component settings (in Designer).

    Find similar options to as shown in VB picture below: