Reputation: 81
I downloaded the source code from: http://diptimayapatra.wordpress.com/2010/04/05/using-windows-media-player-com-in-wpf/
I want to customize the play, buy add Play, Pause and Stop buttons to the form.
However I can't access the method: axWmp.Ctlcontrols.play();
'WMPLib.IWMPControls' does not contain a definition for 'play' and no extension method 'play' accepting a first argument of type 'WMPLib.IWMPControls' could be found (are you missing a using directive or an assembly reference?)'
This would not happen if I add Windows Media Player under Windows Form .NET 2.0 Application. Is there any way to access the .play()
and .stop()
functions?
Upvotes: 3
Views: 3875
Reputation: 21
You need to add a COM reference to Windows Media Player wmp.dll in your main project.
Upvotes: 2