3

I have a windows application. I am using axwindowsmediaplayer which is in AxInterop.WMPLib dll.I dont have any problem about playing the videos, but I want to fire an event when the user goes to a specific time by clicking on media player . I looked in the dll files but i couldnt find such an event. Can anyone help me about how can i fire an event when user goes to another time on video ?

Thanks

Ozgur Dogus
  • 911
  • 3
  • 14
  • 38

1 Answers1

4

How about the PositionChange event?

Edit

A short example:

public Form1()
{
  // ...
  axWindowsMediaPlayer1.PositionChange += axWindowsMediaPlayer1_PositionChange;
}

void axWindowsMediaPlayer1_PositionChange(object sender, AxWMPLib._WMPOCXEvents_PositionChangeEvent e)
{
  MessageBox.Show("The user changed the position from " + e.oldPosition + " to " + e.newPosition);
}
Sani Huttunen
  • 23,620
  • 6
  • 72
  • 79