My application has its own window design, which means that each window has the following parameters: (XAML): not WindowStyle = "None" AllowsTransparency = "False"
In one of the auxiliary windows, you need to display the Flash component, the Flash ActiveX component is located in XAML:
As for the transparency window , there is a known problem with WPF and hosted components of winforms, it just does not work out of the box. To be able to view the Flash component, the AllowsTransparency parameter must be set to False, otherwise the Flash component simply will not be displayed.
To maintain the transparency of the window (and general L&F), I changed this piece of code: http://blogs.msdn.com/b/adam_nathan/archive/2006/05/04/589686.aspx
IntPtr hwnd = new WindowInteropHelper(window).Handle;
window.Background = Brushes.Transparent;
HwndSource.FromHwnd(hwnd).CompositionTarget.BackgroundColor = Colors.Transparent;
MARGINS margins = new MARGINS(margin);
DwmExtendFrameIntoClientArea(hwnd, ref margins);
So now everything works fine until I started testing it on XP . Obviously, the above code fragment does not work on XP, because the DLL used (dwmapi.dll) is the Vista DLL.
The question is, is it possible to achieve the same result in XP, and if so, how?
I tried to change this piece of code: How to create a translucent window in WPF that allows mouse events to pass through or similar other examples, I could not achieve the transparency of the window.
Would thank for any advice.