how to play flash in WPF application

2019-03-02 05:45发布

问题:

I have a WPF application and I want to play flash movies in it.

I used the WInforms active X control as described in this link

It worked partially, but now whenever I run the application it crashes saying "InvalidActiveXStateException"

does anyone have an idea how to solve this?

回答1:

I would recommend adding a WebBrowser control to your WPF application and allow IE to load the URL of the Flash Movie directly; which in turn would load the Flash Plugin. You will need to build your WPF application as x86 only for this to work on x64 Windows.



回答2:

I found a solution. You can use a AxShockwaveFlash. see this link