Ok, so I've got a video player program going in Visual C# using DirectX.AudeoVideoPlayback.Video. I've got a control bar set up so that when you move the mouse over when the video is playing, the control bar is visible and then when you move the mouse away, it is not. Like WMP11.
The problem I've got is that the Video is behaving differently when I play a second video vs. when I play the first video after running the program. When I open the program and run the video the first time, everything work's great. The MouseMove event fires and (based on the location of the pointer) determines whether or not to show the control.
When I close the video and open a second one, the MouseMove event no longer fires, even though I have used the same method to set up and play the video each time.
Here's my code for playing a movie:
private
void playCurrentMovie()
{
String f = myMovies.getMovie(currentIndex).getURL();
if (validFileType(f))
{
if (File.Exists(f))
{
try
{
this.mov = new Video(f, false);
this.mov.Owner = this;
this.mov.Play();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Movie Playback Error");
}
}
else
MessageBox.Show(f + " - File not found.", "Movie Playback Error");
}
else
MessageBox.Show(Path.GetExtension(f) + " is not a valid file type.", "Movie Playback Error");
}
and stopping the movie is just:
this.mov.Stop();
this.mov.Dispose();