I've read all the comments on the site on this topic but still can't get this to work.
I am using Directx to play video in c#. This is working ok, but I can't work out how to trigger the Video.Ending event.
In the InitialiseComponent
I have
this.MyVideo = new Microsoft.DirectX.AudioVideoPlayback.Video(filename);
and
// MyVideo
//
this.MyVideo.Ending += new System.EventHandler(this.MyVideo_Ending);
This is the error message I get.
Warning 1 Events cannot be set on the object passed to the event binding service because a site associated with the object could not be located. F:\Personal\New Folder\Event Recorder\Event Recorder\MediaForm.Designer.cs 134 0
Here is my method
private void MyVideo_Ending(object sender, System.EventArgs e)
{
btnPlay.Text = "Play";
}
Any suggestion welcome. I thought I understood event handlers but I'm obviously missing something.
Thank you