I use this code to repeat my background sound, but it can' t find AxWMPLib._WMPOC XEvents_PlaySta teChangeEvent and tells me:
"Error 1 No overload for 'BackgroundMusi c_PlayStateChan ge' matches delegate 'WMPLib._WMPOCX Events_PlayStat eChangeEventHan dler' C:\Users\Ventsi slav\Documents\ Visual Studio 2008\Projects\W MGame\WMGame\Ga me.cs 87 13 WMGame
"
What reference I have to insert to find this AxWMPLib, because my BackgroundMusic object is only WMPLib and now I need AxWMPLib?
"Error 1 No overload for 'BackgroundMusi c_PlayStateChan ge' matches delegate 'WMPLib._WMPOCX Events_PlayStat eChangeEventHan dler' C:\Users\Ventsi slav\Documents\ Visual Studio 2008\Projects\W MGame\WMGame\Ga me.cs 87 13 WMGame
"
What reference I have to insert to find this AxWMPLib, because my BackgroundMusic object is only WMPLib and now I need AxWMPLib?
Code:
BackgroundMusic.PlayStateChange +=
new _WMPOCXEvents_PlayStateChangeEventHandler(BackgroundMusic_PlayStateChange);
...
public void BackgroundMusic_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
BackgroundMusic.URL = "C://BackSound.wav";
}