Vb Net Windows Media Player Current Position
To get the current position, handle the AxWindowsMediaPlayer.PositionChange event. To get notified when the current status (playing, stopped, etc.). To run this sample code on your form, you need these things with default names: a windows media player control 1 button 1 timer [drag it from toolbox. Windows Media Player control - get/set video position? Media Player ActiveX (axWindowsMediaPlayer) component in C# WinForms application. Is it possible to get and set the current position of the video that is being played using this control? Releasing a media file in Windows Media Player Control. Hot Network Questions. Today we will learn how to embed Windows Media Player into our program and play any form of media through it. Design Start a new Visual Basic Windows Application and add the following controls to it.
I just need to know when the media player finishes of playing a song, if there is a flag or something...
3 Answers
According to MSDN, you should be able to use the PlayStateChanged
event. The event is AxWMPLib._WMPOCXEvents_PlayStateChangeEvent
See the enumeration reference here . It seems that you can use wmppsMediaEnded
to find out when the media stream has ended.
I think this gives an example in VB.net, maybe you can adapt it for your purpose: http://msdn.microsoft.com/en-us/library/dd562692(v=vs.85).aspx
EDIT: Just noticed there's a c# solution below the VB example.
KevinVb Net Windows Media Player Current Position Update
KevinCheck code implementation of playstateChanged event Here
}
Not the answer you're looking for? Browse other questions tagged c#visual-studio-2005windows-media-player or ask your own question.
I am using Windows Media Player ActiveX (axWindowsMediaPlayer) component in C# WinForms application. Is it possible to get and set the current position of the video that is being played using this control?
m0sVb Net Windows Media Player Current Position 2017
m0s1 Answer
Vb.net Windows Media Player
axWindowsMediaPlayer1.Ctlcontrols.currentPosition = positionInSeconds;