Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firing event when time changes on axwindowsmediaplayer

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

like image 362
Ozgur Dogus Avatar asked Dec 04 '25 15:12

Ozgur Dogus


1 Answers

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);
}
like image 67
Sani Singh Huttunen Avatar answered Dec 07 '25 23:12

Sani Singh Huttunen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!