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.

Active5 years, 7 months ago
Update

I just need to know when the media player finishes of playing a song, if there is a flag or something...

luigi007luigi007

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.

Bryan CrosbyBryan Crosby
5,9633 gold badges30 silver badges53 bronze badges
Vb Net Windows Media Player Current Position

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.

Kevin

Vb Net Windows Media Player Current Position Update

Kevin
17.3k13 gold badges82 silver badges133 bronze badges

Check code implementation of playstateChanged event Here

}

Vb.net windows media player
AvinashAvinash

Not the answer you're looking for? Browse other questions tagged c#visual-studio-2005windows-media-player or ask your own question.

Active8 years, 4 months ago

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?

m0s

Vb Net Windows Media Player Current Position 2017

m0s
2,9948 gold badges33 silver badges57 bronze badges

1 Answer

Vb.net Windows Media Player

axWindowsMediaPlayer1.Ctlcontrols.currentPosition = positionInSeconds;

loraderonloraderon
3,7962 gold badges27 silver badges33 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Not the answer you're looking for? Browse other questions tagged c#windows-media-playeraxwindowsmediaplayer or ask your own question.